У нас вы можете посмотреть бесплатно Network Socket Programming in C# - Lecture или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
This is a synopsis of a class lecture on Network Sockets in C# from the second year of the Computer Science course at the University of Hull. It does not represent the actual class, which was much longer and more detailed, but is a quick summary of the points for those unable to attend. It is not intended to be a stand-alone learning lecture. There are closed captions for those without audio. It is part of a series of 11 videos on socket programming. It includes basic template codes for a client and a server, as well as multi-threading. From these examples students can implement their own example clients and servers. The video was provided for those students who were unable to attend this class but still need to complete the assignment. The code from the slides is shown below for those with no access to the slides on the VLE: ----- //Demonstrate Sockets using System; using System.Net.Sockets; using System.IO; public class Whois { static void Main (string[] args) { int c; TcpClient client = new TcpClient(); client.Connect("whois.networksolutions.com",43); StreamWriter sw = new StreamWriter(client.GetStream()); StreamReader sr = new StreamReader(client.GetStream()); sw.WriteLine(args[0]); Console.WriteLine(sr.ReadToEnd()); } } ------------- public void runServer() { TcpListener listener; Socket connection; NetworkStream socketStream; try { listener = new TcpListner(43) ; while (true) { connection = listener.AcceptSocket() ; socketStream = new NetworkStream (connection) ; doRequest(socketStream); socketStream.Close(); connection.Close(); } } catch (Exception e) { log.log(e.ToString() ); } } ------------ using System; using System.Threading; class whois { Thread t; public start() { t = new Thread( new ThreadStart( run ) ) ; t.Start(); } public void run () { // perform server code } static void Main(string args[]) { Application.Run( new start() ) ; } }