資源簡介
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Net;
using?System.Net.Sockets;
using?System.Threading;
namespace?SocketClient
{
????class?Program
????{
????????private?static?byte[]?result?=?new?byte[1024];
????????static?void?Main(string[]?args)
????????{
????????????//設(shè)定服務器IP地址
????????????IPAddress?ip?=?IPAddress.Parse(“127.0.0.1“);
????????????Socket?clientSocket?=?new?Socket(AddressFamily.InterNetwork?SocketType.Stream?ProtocolType.Tcp);
????????????try
????????????{
????????????????clientSocket.Connect(new?IPEndPoint(ip?8885));?//配置服務器IP與端口
????????????????Console.WriteLine(“連接服務器成功“);
????????????}
????????????catch
????????????{
????????????????Console.WriteLine(“連接服務器失敗,請按回車鍵退出!“);
????????????????ret
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1374??2011-07-23?22:13??SocketClient\Properties\AssemblyInfo.cs
?????文件???????2497??2011-07-23?22:27??SocketClient\SocketClient.csproj
?????文件????????490??2009-06-11?05:14??SocketClient\bin\Debug\SocketClient.vshost.exe.manifest
?????文件??????14328??2011-07-24?15:30??SocketClient\bin\Debug\SocketClient.vshost.exe
?????文件???????5632??2011-07-24?15:35??SocketClient\bin\Debug\SocketClient.exe
?????文件??????11776??2011-07-24?15:35??SocketClient\bin\Debug\SocketClient.pdb
?????文件??????11776??2011-07-24?15:35??SocketClient\obj\Debug\SocketClient.pdb
?????文件???????5632??2011-07-24?15:35??SocketClient\obj\Debug\SocketClient.exe
?????文件????????384??2011-07-24?15:35??SocketClient\obj\Debug\SocketClient.csproj.FileListAbsolute.txt
?????文件???????1932??2011-07-24?15:35??SocketClient\Program.cs
?????文件???????1374??2011-07-23?22:13??SocketServer\Properties\AssemblyInfo.cs
?????文件???????2497??2011-07-23?22:27??SocketServer\SocketServer.csproj
?????文件????????490??2009-06-11?05:14??SocketServer\bin\Debug\SocketServer.vshost.exe.manifest
?????文件??????14328??2011-07-23?23:18??SocketServer\bin\Debug\SocketServer.vshost.exe
?????文件???????2725??2011-07-23?23:08??SocketServer\bin\Debug\SocketServer.rar
?????文件???????6144??2011-07-24?15:35??SocketServer\bin\Debug\SocketServer.exe
?????文件??????13824??2011-07-24?15:35??SocketServer\bin\Debug\SocketServer.pdb
?????文件??????13824??2011-07-24?15:35??SocketServer\obj\Debug\SocketServer.pdb
?????文件???????6144??2011-07-24?15:35??SocketServer\obj\Debug\SocketServer.exe
?????文件????????384??2011-07-24?15:35??SocketServer\obj\Debug\SocketServer.csproj.FileListAbsolute.txt
?????文件???????2490??2011-07-24?15:35??SocketServer\Program.cs
?????目錄??????????0??2011-07-23?22:13??SocketClient\obj\Debug\TempPE
?????目錄??????????0??2011-07-23?22:13??SocketServer\obj\Debug\TempPE
?????目錄??????????0??2011-07-23?22:13??SocketClient\bin\Debug
?????目錄??????????0??2011-07-23?22:13??SocketClient\obj\Debug
?????目錄??????????0??2011-07-23?22:13??SocketServer\bin\Debug
?????目錄??????????0??2011-07-23?22:13??SocketServer\obj\Debug
?????目錄??????????0??2011-07-23?22:13??SocketClient\Properties
?????目錄??????????0??2011-07-23?22:13??SocketClient\bin
?????目錄??????????0??2011-07-23?22:13??SocketClient\obj
............此處省略8個文件信息
評論
共有 條評論