• 大小: 0.04M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: Socket  tcp  c  Server  t  

资源简介

socket编程_tcp协议_Server

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;  

namespace socket编程_tcp协议_Server
{
    class Program
    {
        static void Main(string[] args)
        {
            /** 
             * [1]创建socket 指定网络类型,传输数据类型, 
             * AddressFamily.InterNetwork 指定网络类型 
             * SocketType.Stream 传输数据类型 
             * ProtocolType.Tcp 协议类型 
             * */
            Socket tcpSocket = new Socket(AddressFamily.InterNetwork SocketType.Stream ProtocolType.Tcp);
            //[2]绑定ip 跟端口号  
            IPAddress ipAddress = IPAddress.Parse(“127.0.0.1“);//接收字节型数据  
            IPEndPoint ipEndPoint = new IPEndPoint(ipAddress 9900);//对ip和端口号进行封装  
  

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        187  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\App.config

     文件       5632  2017-02-09 11:24  socket编程_tcp协议_Server\socket编程_tcp协议_Server\bin\Debug\socket编程_tcp协议_Server.exe

     文件        187  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\bin\Debug\socket编程_tcp协议_Server.exe.config

     文件      13824  2017-02-09 11:24  socket编程_tcp协议_Server\socket编程_tcp协议_Server\bin\Debug\socket编程_tcp协议_Server.pdb

     文件      22984  2017-02-09 11:24  socket编程_tcp协议_Server\socket编程_tcp协议_Server\bin\Debug\socket编程_tcp协议_Server.vshost.exe

     文件        187  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\bin\Debug\socket编程_tcp协议_Server.vshost.exe.config

     文件        490  2012-06-06 02:06  socket编程_tcp协议_Server\socket编程_tcp协议_Server\bin\Debug\socket编程_tcp协议_Server.vshost.exe.manifest

     文件       6655  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        592  2017-02-09 11:24  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj\Debug\socket编程_tcp协议_Server.csproj.FileListAbsolute.txt

     文件       5632  2017-02-09 11:24  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj\Debug\socket编程_tcp协议_Server.exe

     文件      13824  2017-02-09 11:24  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj\Debug\socket编程_tcp协议_Server.pdb

     文件          0  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件       2054  2017-02-09 11:24  socket编程_tcp协议_Server\socket编程_tcp协议_Server\Program.cs

     文件       1396  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\Properties\AssemblyInfo.cs

     文件       2599  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\socket编程_tcp协议_Server.csproj

     文件        977  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server.sln

    ..A..H.     63488  2017-02-09 11:24  socket编程_tcp协议_Server\socket编程_tcp协议_Server.v11.suo

     目录          0  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj\Debug\TempPE

     目录          0  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\bin\Debug

     目录          0  2017-02-09 11:24  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj\Debug

     目录          0  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\bin

     目录          0  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\obj

     目录          0  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server\Properties

     目录          0  2017-02-09 11:21  socket编程_tcp协议_Server\socket编程_tcp协议_Server

     目录          0  2017-02-09 11:21  socket编程_tcp协议_Server

----------- ---------  ---------- -----  ----

               140708                    27



............此处省略0个文件信息

评论

共有 条评论