今天来写一个UPD 1.服务端: using System; using System.Collections.Generic; using System.Text; using System.Net.Sockets; using System.Net; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { // 1…
Socket入门 最简单的Server端读取Client端内容的demo public class Server { public static void main(String [] args) throws Exception{ ServerSocket ss = new ServerSocket(9000); Socket s = ss.accept(); InputStream input = s.getInputStream(); byte[] bytes = new byte[102…
Socket入门 最简单的Server端读取Client端内容的demo public class Server { public static void main(String [] args) throws Exception{ ServerSocket ss = new ServerSocket(9000); Socket s = ss.accept(); InputStream input = s.getInputStream(); byte[] bytes = new byte[102…