Showing posts with label dotnet. Show all posts
Showing posts with label dotnet. Show all posts

Thursday, May 5, 2011

Tutorial Asynchronous Socket Programming using .NET (For Server)

The following example program creates a server that receives connection requests from clients. The server is built with an asynchronous socket, so execution of the server application is not suspended while it waits for a connection from a client. The application receives a string from the client, displays the string on the console, and then echoes the string back to the client. The string from the client must contain the string "" to signal the end of the message.


Code For VB

Thursday, April 21, 2011

Tutorial Asynchronous Socket Programming using .NET (For Client)

The following example program creates a client that connects to a server. The client is built with an asynchronous socket, so execution of the client application is not suspended while the server returns a response. The application sends a string to the server and then displays the string returned by the server on the console.

Tutorial Synchronous Socket Programming using .NET (For Server)

The following example program creates a server that receives connection requests from clients. The server is built with a synchronous socket, so execution of the server application is suspended while it waits for a connection from a client. The application receives a string from the client, displays the string on the console, and then echoes the string back to the client. The string from the client must contain the string "<EOF>" to signal the end of the message.

Wednesday, April 20, 2011

Tutorial Synchronous Socket Programming using .NET (For Client)

The following example program creates a client that connects to a server. The client is built with a synchronous socket, so execution of the client application is suspended until the server returns a response. The application sends a string to the server and then displays the string returned by the server on the console.

CODE FOR VB
Imports System
Imports System.Net
Imports System.Net.Sockets
Imports System.Text