![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: well i need some help on winsock stuff
This thread is over a year old. If the OP hasn't solved his/her problem, you're probably way to late. Please refer to the date of the post, right above the user name.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#12 | |
|
Programmer
|
Re: well i need some help on winsock stuff
Quote:
LAN Chat System server side is as follows Private Sub cmdSend_Click() On Error GoTo NoConnection Winsock1.SendData "Severer : " + txtSend NoConnection: Exit Sub End Sub Private Sub Form_Load() Winsock1.LocalPort = 80 Winsock1.Listen End Sub Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long) Winsock1.Close Winsock1.Accept requestID End Sub Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim GetMessage As String Winsock1.GetData GetMessage txtChat = txtChat + GetMessage + vbCrLf End Sub Client side is as follows Private Sub cmdSend_Click() Winsock1.SendData "Client : " & txtSend txtMain = txtMain & "Client : " & txtSend & vbNewLine & vbCrLf End Sub Private Sub newcon_Click() Dim NewIP As String NewIP = InputBox("Please put in the IP of your buddy or PC on the network to connect to") Winsock1.Close Winsock1.Connect NewIP, 80 End Sub Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim GetMessage As String Winsock1.GetData GetMessage txtMain = txtMain & GetMessage & vbNewLine & vbCrLf End Sub |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|