Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.sdk
UPDATED: Very simple UDP chat app not working !
Allan McLemore
1/2/2003 2:08:00 AM
1 Answer
(garygumsft)
1/2/2003 8:26:00 AM
0
Hi Steve,
There is an error occurring in the Listen method. Please use the
try...catch to capture the error. Fo rexample,
try
{
while (this.isChatting)
{
// Tried listening to everyone and still no luck !!!
System.Net.IPEndPoint ipEndPoint = new
System.Net.IPEndPoint(System.Net.IPAddress.Any, 0);
System.Byte[] receiveBytes = this.udpClient.Receive(ref ipEndPoint);
this.richTextBoxChatConversation.Text += "I said:" + " " +
System.Text.Encoding.ASCII.GetString(receiveBytes).ToString() + "\r\n";
}
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
For a complete sample on how to developa .NET chat application, please
refer to the sample at
http://samples.gotdotnet.com/quickstart/howto/doc/TCPUDP/Broadcast...
.aspx.
Gary
This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET?
http://w...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
UPDATED: Very simple UDP chat app not working !
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password