Code for Communicating over Sockets?
Answer / Purshottum Das Chandwani
In ASP.NET, you can use the System.Net.Sockets namespace to create a TCP client and communicate over sockets. Here's a simple example:
```csharp
TcpClient client = new TcpClient("ServerIPAddress", Port);
NetworkStream stream = client.GetStream();
Byte[] buffer = Encoding.ASCII.GetBytes("Hello, World!");
stream.Write(buffer, 0, buffer.Length);
```
| Is This Answer Correct ? | 0 Yes | 0 No |
How to send e-mail from an ASP.NET application?
16 Answers DataPoint, Infosys, Persistent, Radar, TCS, Wipro,
How to Create Scrollable Micro Windows?
how to design a ListView control?
i have a gird with columns all are coming from database,this will bind in item templete in gridview as textboxex.and i have button below named Update.i want to update all the records in the grid,but if user change the value of one textbox,what is the easy way 2 do this
where is assembly are store
How to Bind Nested XML to a Repeater Control with Container.DataItem?
How to get the row index on checking a Checkbox in a ListView
Give coding for Implementing a Fixed GridView Header in ASP.NET?
How to get the row index on checking a Checkbox in a ListView
How to use Client-side Script to Focus Controls in ASP.NET?
how the value of label is printed through a button in asp.net web application
Data Reader Vs DataSet