Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
Go Back  Xtreme Visual Basic Talk > > > Winsock not sending back to clients [CODe Included]


Reply
 
Thread Tools Display Modes
  #1  
Old 11-02-2012, 12:57 PM
ZombieAssassin ZombieAssassin is offline
Newcomer
 
Join Date: Nov 2012
Posts: 1
Angry Winsock not sending back to clients [CODe Included]


So i have this client/server chat i am working on, the clients send messages to the server but can only see what they themselves typed, none of the other messages from other clients are being sent back. I have included the code for the server side, could someone please tell me what i am doing wrong here...

Code:
Option Explicit
Private Socks As Integer
Private Sub cmdCheck_Click()
MsgBox Winsock1(0).State
End Sub
Private Sub cmdStart_Click()
Winsock1(0).Close
Winsock1(0).Listen
lblStatus.Caption = "Default Room Server: Running!"
End Sub
Private Sub cmdStop_Click()
Winsock1(0).Close
lblStatus.Caption = "Default Room Server: Stopped!"
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub

Private Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As Long)
Socks = Socks + 1
Load Winsock1(Socks)
Winsock1(Socks).Accept requestID
End Sub
Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim strdata As String
Dim intCnt As Integer
Winsock1(Index).GetData strdata, vbString
For intCnt = 1 To Socks
    If Winsock1(Index).State = sckConnected Then
        Winsock1(Index).SendData strdata
    End If
Next intCnt
End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included] Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
 
Winsock not sending back to clients [CODe Included]
Winsock not sending back to clients [CODe Included]
 
-->