Guest Brainforce Posted October 24, 2002 Posted October 24, 2002 Hallo, my name is Mark and i'm an italian boy soo excuse me for my poor english. Take a look at this problem. I have a Client thas send a message text to a server, but i dont know how i can get this message and put in in a textbox. This is my source code of the server #code Imports System.Net.Sockets Imports System.Text Public Class Form1 Inherits System.Windows.Forms.Form Const PORT_NUM As Integer = 10000 Private server As TcpListener Private Sub avvia_server_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles avvia_server.Click server = New TcpListener(PORT_NUM) server.Start() End Sub Private Sub spegni_server_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles spegni_server.Click server.Stop() End Sub End Class The server now start to listener on port 10000 when i click on one button, and stop to listener when i click another one, how i can receive a message and put it in one text.box? Thanks very much. Quote
*Gurus* Derek Stone Posted October 24, 2002 *Gurus* Posted October 24, 2002 Dim s As Socket If server.Pending = True Then s = server.AcceptSocket() End If Put that in a loop. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.