摘要: 今天我们来学 socket 发送结构体1. 先看要发送的结构体usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Runtime.InteropServices;namespaceLin.p2p.Mo{//... 阅读全文
posted @ 2014-10-30 19:11 vonly 阅读(1716) 评论(0) 推荐(0) 编辑
摘要: 今天来写一个UPD1.服务端:usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Net.Sockets;usingSystem.Net;namespaceConsoleApplication1{class... 阅读全文
posted @ 2014-10-30 19:10 vonly 阅读(666) 评论(0) 推荐(0) 编辑
摘要: 现在来传一个图片看看, 改改程序, 看看服务端图片为 140K, 1.jgp1. 服务端1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Text;4usingSystem.Net.Sockets;5usingSystem.Net;... 阅读全文
posted @ 2014-10-30 19:09 vonly 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1. 服务端程序1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Text;4usingSystem.Net.Sockets;5usingSystem.Net;67namespaceConsoleApplication18{9cla... 阅读全文
posted @ 2014-10-30 19:08 vonly 阅读(227) 评论(0) 推荐(0) 编辑
摘要: StructLayout特性StructLayout特性公共语言运行库利用StructLayoutAttribute控制类或结构的数据字段在托管内存中的物理布局,即类或结构需要按某种方式排列。如果要将类传递给需要指定布局的非托管代码,则显式控制类布局是重要的。它的构造函数中用 LayoutKind值... 阅读全文
posted @ 2014-10-30 19:06 vonly 阅读(336) 评论(0) 推荐(0) 编辑