Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Multiple Request With Winsock


Greeting,

I have a little problem with winsock. I have a server and several
client. I want to transfer text from server to client trough the network
In this case, I using winsock to transfer the text. It is ok when only 2
computer connected (1 server and 1 client). But, when 3 computer
Connected (1 server and 2 client) I cant broadcast text to all client.

Does any body know how to broadcast text fom server to client trough the
network and winsock?

thanks

Rgds,
Rano Nugrah Agung Homan




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Winsock Syntax? (To Request A Website With The Winsock Control)
Ok, I don't know very much about Winsock and am just now starting to use it. I'm making an anonymity program that modifies referer and user agent data. I managed to find an example of how its done on planetsourcecode.com but there's a few things that aren't working.

Anyway, when this string is sent, it sends the headers and a request for index.html from the connected host (winsock1.connect domain.com 80).

GET index.html HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-comet, */*
Accept-Language: en
Accept-Encoding: gzip , deflate
Cache-Control: no-cache
Proxy-Connection: Keep-Alive
User-Agent: Whatever
Referer: www.whatever.com

But when I used the website http://ipid.shat.net/ as the domain to see if code mdified the headers or not, it directed me instead to just www.shat.net. How would a browser request information to ipid.shat.net?

Also, I noticed that by sending just that information, cookies don't work properly. What other tags do I have to add onto that for it to recieve my session information? Thanks a lot.

Winsock Request
I have a Winsock component setup right now on my network, exact same as whats in this thread

I would like to know if a similar control can be built using Winsock to do this:


1) Connect to a remote computer, by IP address. (I have a code that determines the IP address of the remote machine already..)

2) Open a .txt file, send it back to (my) the users computer and displays it in a text box on screen.

3) On command button press, take what ever is in my text box, and send the file back to the remote computer and save it.

Kind of like editing a configuration file, remotly.

I know the application would have to be running on the remote end as well as my end for this to work, if its at all possible.

I would really like to do this, I appeciate everyones help in advance!

Winsock Example Request
I'm at work where I can't get to any help files for winsock.  Can somebody give me a quick example of the code required to create a winsock instance, including telling it to listen and respont to internet requests?  I'm going to attempt to make MS Access act like a simple server, and I just don't have the resources here to get it running.  Thanks!

Winsock HTTP Request Help
I need help with this, my wrapper uses winsock to send requests and the close event does not fire which makes the connection stay open forever, my wrapper is at the bottom it is a attachment

WinSock Request Accept
Hey,

I have been trying to get this code to work, It's most likely something stupid am doing, but i cant get my server program type thingie to accept the Request ID from the client program thingie... Here is the code to the part that it says is wrong (If you need anyother parts tell me an i'll post it)


Code:
Private Sub HostSocket_ConnectionRequest(ByVal requestID As Long)

'Show Request In Host Log
HMsg = "Connection request id " & requestID & " from " & HostSocket.RemoteHostIP
HostLog.AddItem (HMsg)

sRequestID = requestID
iSockets = iSockets + 1
ConNumber.Caption = iSockets
Load HostSocket(iSockets)
HostSocket.LocalPort = 1007
HostSocket.Accept requestID

End Sub
PS. I looked at an example to help me with this, so am not sure whats wrong.

Thx in advance.

Ali.

Can Winsock DLL Do Other Protocol Request ...
guys,

i find that the winsock OCX really is limited in its capability...
can anyone suggest me a better one for network programming? because the protocol type is limited to a few only....

I hope to do RTSP / RTP request ... is there any thing that i can used to do that ???

can Winsock Dll do other protocol request or its the total same with the winsock OCX?

Does anyone has a sample using winsock DLL (as client)...??

Winsock : GET Http Gives Me Bad Request , Why?
guys,

is the statement below wrong??

GET http://www.hypermart.com HTTP/1.0


the dataarrival shows me error message...

400 BAD Request

can anyone justify this please?

Winsock Sample Request
Hi all,

I need to make a server app for my project. I have concluded that I will need to implement Winsock to do so. I have read up on all Winsock articles here (and many others elsewhere) and have downloaded and studied all the samples I could find.

However, I am unable to do what I want because:

- The tutorials say that the IP address or friendly name of the target computer MUST be specified for the Winsock control to connect on the other side. This strikes me as very backward, as I can not always know what IP addresses my customers' network stations will be running on and cannot also predict their friendly names. Does this have to be hard-coded?

- Try as I may, I cannot create a working sample of Server.Exe and Client.Exe to run on the same machine as I cannot afford the luxury of testing my code over two machines. Is there any way I can debug / test on one machine?

If any member proficient with Winsock (Laura Stephens and Jason Rogers come to mind) would like to help, I shall appreciate a small sample to get me started by solving the above two problems.

GoodGuy
Experience is a bad teacher for its exams precede its lessons.

Edited by - GoodGuy on 12/10/2007 10:23:30 PM

Winsock Array Connection Request
i made a post a couple days back gavino answered
im trying to make my multi chat program and well, it isnt goin by too well. for starters the client cant connect

Code:
Private Sub sckSocket_ConnectionRequest(Index As Integer, ByVal requestID As Long)
SockNum = SockNum + 1
Load sckSocket(SockNum)
sckSocket(SockNum).Listen
sckSocket(SockNum).Accept requestID
End Sub
is there sumthing wrong with that?

[VB6] Winsock POST Request Problem
I'm trying to connecto to google.com and translate a simple word (just to test if works).

And I have a problem when I'm sending POST request data, here is my code:


Code:
Private Sub Command1_Click()
Winsock1.Close
Winsock1.Connect "www.google.com", "80"
End Sub


Private Sub Winsock1_Connect()
Dim packet As String
Dim strpost As String

strpost = "hl=it&ie=UTF8&text=hello&sl=en&sl=en&tl=it&tl=it"

packet = "POST /translate_t HTTP/1.1" & vbCrLf
packet = packet & "Host: www.google.com" & vbCrLf
packet = packet & "Accept: */*" & vbCrLf
packet = packet & "Accept-Language: it,it-it;q=0.8,en;q=0.5,en-us;q=0.3" & vbCrLf & vbCrLf

packet = packet & "Content-Type: " & "application/x-www-form-urlencoded" & vbCrLf
packet = packet & "Content-Length: " & Len(strpost) & vbCrLf
packet = packet & strpost

Winsock1.SendData packet

Text1.Text = Text1.Text & packet

End Sub


Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim data As String

Winsock1.GetData data
Text2.Text = Text2.Text & data & vbCrLf

End Sub



As you can see I want the GETDATA in Text2.Text but I recieve this error:


Code:
HTTP/1.1 411 Length Required
Date: Fri, 01 Aug 2008 13:57:24 GMT
Content-Type: text/html; charset=UTF-8
Server: GFE/1.3
Content-Length: 1357

{html code}


What's the problem?!

Thanks in advance.

How Can You Request A Webpage Using Winsock And HTTPS?
HTTP is easy to form requests with using winsock..
but how can you make requests to a https site?

WinSock Connection Request Error!
When I use this code for a winsock connection request:

Code:
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Accept requestID
txtRecive.Text = txtRecive.Text & vbCrLf & "ChatX: Connection Request Detected."
End Sub


I get runtime error 40020:
Invalid operation at current state

when I hit debug it highlights that code snippet up there! HELP

Request For Help - How Can I Combine Multiple Fields In A Combobox?
I am trying to create a combobox that lists the names of everyone in my database in "Lastname, Firstname" format. For example, my name would appear as "Geller, Steve". However, I keep getting errors on my SQL. I've tried these and they've all failed:

"SELECT NameFirst|| & ',' & ||NameLast As AnalystName FROM tblAnalystNames”
"SELECT NameFirst & ',' & NameLast As AnalystName FROM tblAnalystNames"
"SELECT NameFirst & , & NameLast As AnalystName FROM tblAnalystNames"
"SELECT NameFirst || ', ' || NameLast As AnalystName FROM tblAnalystNames"

Can someone tell me the SQL I can use to get this?

Thank you,

Steve Geller

Viewing Cookies Sent With Either Winsock Or INet Request?
Hello,

Is there a way that I can send a request via INET (Most Likely), and read the cookies which were sent with that request?

Thanks

Winsock Server Connection Request Problem
hey, this is my code


Code:
Private Sub wskServer_ConnectionRequest(ByVal requestID As Long)
Dim msgboxResult

msgboxResult = MsgBox("A connect request has been initiated by: " & wskServer.RemoteHostIP & vbNewLine & "Would you like to accept it?", vbYesNo, "Connection Request")

If msgboxResult = vbYes Then
wskServer.Accept requestID
isServer = True
End If
End Sub


now the problem is, whenever i run it, and have a client try to connect to it, this is the error the server gives me on this line "wskServer.Accept requestID"

---------------------------
Project1
---------------------------
Run-time error '40020':

Invalid operation at current state
---------------------------
OK
---------------------------

can someone help?


EDIT: and yes, i did try:
wskServer.Close
wskServer.Accept requestID

but it doesn't work. if u need 2 see my whole code to know whats going on, just let me know

Winsock/cookie Request Entity Too Large...
hi i'm sending a cookie header via winsock but i think it's to large cause I'm receiving a "Request Entity Too Large" in the HTTP Response. is there a way around this?

Winsock - Notification When User Accepts Request
Does anyone know of a way that an initiator of a Winsock connection can be notified when a user on the other end accepts the connection ? I'm new to Winsock, so my terminology might not be the best, but I'm trying to find out if the inititator has any way of knowing that a connection was made before any messages are exchanged?

Thanks for any help....

Does Anyone Have An Example Of How To Send A POST Request With Winsock And A Proxy?
I know how GET works with winsock and a proxy, but how can you use a proxy and use POST?

anyone have an example?

Request Timed Out Using Multiple Inet Controls To OpenURL
Guys I have a problem that I'm not sure what is wrong.

I put an Inet control as a control array, and i have 10 indexes (Inet1(0) to Inet1(9)).
I have 10 Timers that call each of these Inet every 1 second with OpenURL method to get a page from a website.

Problem is It will hit a Request Timed Out error when i have all of them running. But when i run say 1 or 2 of them, they're good to go. The web server which i'm going to pull the page form is OK, the Network is OK too.

Has anyone experienced the samething before ?

HELP: Winsock To Send HTTP POST REQUEST To A Machine
Hello,

I would like to use visual basic to send data to a machine using an HTTP Post request, and cannot decide on the best way to do it. Can I use winsock. Please bear in mind the following.

I am sending a mult-part message (kind of like an email with attachments). It's actually a multimedia message in the MM7 format -> this is similar to email, a multipart MIME message.

I MUST post to a destination using the following format:

http://192.168.3.75:2097/mm7

I need to then send the data which I've formated according to the MM7 spec.

I need to receive responses from the receving application.

Any help would be greatly appreciated.

Thanks

Ben

How To Send Multiple To Multiple Data Using Winsock
I have two forms client and server i run in a localhost. I want to send multiple data from client and server. but how?

My program is too big and long so I make a simple same example to you

Lets say I got String a,b,c i want to send a,b,c to the server and stored in String sa, sb,sc in the server form then send ack(acknowladgement) back to the client...ask client to send the different new data back to the server again but....the data in the server get corrupted in second time ...means it only accept b and c...it ignore the a why?

please help thanks

Code:dim a,b,c,ack as string ' in global

privete sub command_send click
a="qwe"
b="qwe"
c="qwe"
tcpclient.senddata(a)
tcpclient.senddata(b)
tcpclient.senddata(c)
end sub

dim sa,sb,sc.ack as string 'in global also

Private Sub tcpserver_DataArrival(ByVal bytesTotal As Long)
call tcpclient.getdata(sa,8,3)
call tcpclient.getdata(sb,8,3)
call tcpclient.getdata(sc,8,3)
text1.text= a & b & c
ack="received"
tcpclient.senddata(ack)
end sub

Private Sub tcpclient_DataArrival(ByVal bytesTotal As Long)
call tcpclient.getdata(ack)
a="xcx"
b="xcx"
c="xcx"
tcpclient.senddata(a)
tcpclient.senddata(b)
tcpclient.senddata(c)
end sub

Multiple Winsock
Hi all,

Where can I found resouces about how to allow multiple winsock connections??

Thanks,

Ross

Multiple IPs And Winsock
I have a server with 10 ips and was trying to figure out a way to assign a certain IP to certain sockets like number 1-2 socket use 1st IP and number 3-4 sockets use 2nd IP ans so on. Or maybe a way to tell it to rotate through the available IPs for out going connections.

I've tried a few suggested things by friends but can't seem to get anything to work.

Any ideas appreciated.

Winsock And Multiple IPs
I have a Windows 2000 server on which there are about 50 or 60 odd IP addresses binded to its network card

I was building a small winsock server program where it is necessary for me to know which local IP a remote client is using to connect to the server. Can I use .localIP? My understanding is that localhost/ip would only return the default IP of the network card and not the local IP through which a remote client is connecting through. Am I wrong?

Any tips would be appreciated.

Multiple Winsock Connections
Ok, I think I finally figured out how to use winsock.dll, but now i want to know how i can let multiple clients connect to one server.

can someone help me on using the dll to make multiple connections.

thanx

Multiple Connections With Winsock!
i have a couple of questions: i'm making this msn-like program using Winsock, making it work between 2 people works fine BUT:

if i want to be able to talk to different people at the same time on a different "channel". how do i do that? do i need a new Winsock control for each connection? or is there an other way?

and what if i want multiple users on 1 channel, more like mIrc, how do i do that??

Multiple Sockets Via Winsock
Hey. I've been looking for a tutorial on creating multiple sockets with Winsock, but I can't seem to find any. Are there any good ones here, or is there another site that I should look at?
To clarify (in case I'm not saying this properly), I want to have one server program, and be able to have multiple clients connect at the same time.

Thanks in advance.

EDIT: Below is the code to my form so far. Maybe this will help.


Code:
Private lngSockets As Long

Private Sub Form_Load()
wskServerListen.LocalPort = 1234
wskServerListen.Listen
End Sub

Private Sub Form_Unload(Cancel As Integer)
Dim lngIndex As Long
wskServerListen.Close

For lngIndex = 0 To lngSockets
wskServerSockets(lngIndex).Close
Next lngIndex
End Sub

Private Sub wskServerListen_ConnectionRequest(ByVal requestID As Long)
lngSockets = lngSockets + 1
Load wskServerSockets(lngSockets)
wskServerSockets(lngSockets).LocalPort = 1234
wskServerSockets(lngSockets).Accept requestID
List1.AddItem "Connection made on socket " & lngSockets
List1.AddItem "--" & wskServerSockets(lngSockets).State
List1.SetFocus
SendKeys "{End}", True
End Sub

Private Sub wskServerSockets_Close(Index As Integer)
List1.AddItem "Connection closed on socket " & Index
List1.AddItem "--" & wskServerSockets(lngSockets).State
List1.SetFocus
SendKeys "{End}", True
End Sub

Winsock Multiple Soc + IP Problems
Doing a final year project for my school.

Encountered 2 problems here.

1) In the multiple winsock, i have successfully made the array so its like I can have many ppl connecting to me. This is my problem. --> eg Listening port = 44410

every array added + 1 new port in 44440 so a new conenction means 44411.

Lets say I have
44410 connected
44411 connected
44412 close
44413 connected

I can't get the clients to connect to the closed port 44412. I think it might be the way I program the listening ports such that a new array and the port will + 1.

From the many examples i saw on the net, i don't quite understand how they do it, but I got the idea of creating arrays of it and making a new port for connection. This problem isn't major, if lets say i have like 1 week to figure it out with my projcet teammate

2) THIS IS A BIG PROBLEM ITS 6 AM NOW I CANT SLEEP UNLESS I SOLVED THIS STUPID PROBLEM. ok here it is

Locally my vb client and server can connect. Through the internet I can't. Lets say there isn't speed issue, how can i solved this ?

for eg on my server i ran

msgbox winsock1.localIP

winsock1.localport = 44410
winsock1.listen

And i get my internet address + listening to 44410

but when i ran netstat -an i get a listening port of 0.0.0.0:44410

I can run this program locally, so its really hard for me to debug. From my understand the 0.0.0.0 means local IP, that explains why locally i can. But the reply from winsock1.localIP states that the localip method which is read only, already lists my internet IP

When i run ipconfig /all its correct.

Called up 10 gus to help me test my program. None of them can conenct to the very first part. **** i release my project to test other stuff but end up i have this.

Any solutions to the 2) ? which is more critical to me now.
2 days ago i was able to run thru the net and now i can't i wondered was it server or client side problems

Anyone experience this please help, very desperate down here to test for bugs before i go on developing.

Multiple Winsock Connections
Is it possible to use a single winsock control and have multiple connections to it?

Multiple Connections In Winsock -_-;
Yeah, I be this is brought up a lot on the forums, but how do you ake multiple connections using a winsock control array. Also, how do you check to see if any that are already loaded are not being used? I looked at WinsockVB.com but it just confused me.

Multiple Connection Winsock
hello all
i am writing a dialer program and want to use winsock to connect the client to the server server. i was wondering what the best way to go about this would be.
there will be 24 clients per server, the client will connect to the server and send its ip address, username, campaign name and station id.

the server will use this information to set up the que and its winsock control to that ip address

then it will need to be able to send records to the clients as calls are received

the question i have is what is the best way to go about this, i dont want to start and then find out that i could have done it better a different way, please help

Multiple Uploads With Winsock
Hi, with the code below I'm uploading images to imageshack.us, but it only uploads one image at a time. Imageshack allows you to upload images to their server with a maximum speed of about 35kbps. If you have a fast(er) upload speed, then you can upload multiple images with multiple connections.

Can anybody help me with changing the code, so it's always uploads two images at once? All the code I can find is about chat applications, etc, which doesn't help me much. I know I need another winsock control (array) to have another connection, but how do I proceed from there?

The image paths are in a Listview.

Thank you.


Code:
Private Sub cmdUploadAll_Click()
Dim lonCount As Long, lonLoop As Long

With ListView1
lonCount = .ListItems.Count

If lonCount = 0 Then Exit Sub

StartNext:

For lonLoop = 1 To lonCount
strURL = ""
Winsock1.Close
strHTML = ""

bolConnected = False
bolError = False
bolRecData = False
strHTTPData = ""

Winsock1.Connect "imageshack.us", 80
.ListItems(lonLoop).ListSubItems(1).Text = "Connecting..."

Do
DoEvents
Loop Until Winsock1.State = sckConnected Or Winsock1.State = sckError

If bolError = True Then
.ListItems(lonLoop).ListSubItems(1).Text = "Error!"

If lonLoop < lonCount Then GoTo StartNext Else Exit Sub

Else
bolConnected = True
End If

.ListItems(lonLoop).ListSubItems(1).Text = "Uploading..."

strFileData = GetFileContents(.ListItems(lonLoop).Text)
strHTTPData = BuildFileUploadRequest(strFileData, GetFileNameFromPath(.ListItems(lonLoop).Text))

Winsock1.SendData strHTTPData

Do
DoEvents
Loop Until bolRecData = True

.ListItems(lonLoop).ListSubItems(1).Text = "Finishing..."

Do
DoEvents
Loop Until bolConnected = False

.ListItems(lonLoop).ListSubItems(1).Text = "Done!"
.ListItems(lonLoop).Text = strURL
Next lonLoop

End With

End Sub

Multiple Winsock Connections
I'm currently working on a program which , on command, opens a winsock connection, then calls a timer. After a short delay the next winsock connection is called. However, for some reason when Winsock2 connects Winsock1 disconnects, and when winsock3 connects winsock2 disconnects, and so on. Does anyone have any advice for me?

Multiple Winsock Controls?
OKay I am making a 4 player game and it will have a server and 3 clients. Here is what I want, could you tell me what best meets my needs?

1) I want any one of the 4 players to be able to run the server

2) When one person makes a move in the game it needs to send the update to the server, and then out to all players.


Everyone is getting the same program, it will ask you when you start up if you want to be the server or client. Should I use 3 winsock controls (one for each client from the server)?

Also, if the server and the clients will look pretty much alike but have a few differences, am I better off using one form for both client and server or should I make one for each? Using one form may get cluttered but using 2 forms may cause some repetitive code.

Lastly, when a client makes a request for a connection how do I assign it a proper connection and have the next request know where to go?

I appreciate any tips or resources to answer my questions, thanks.

Multiple Winsock Connections...
hey, i have been studying some code i found on pscode.com, here is the link... http://pscode.com/vb/scripts/ShowCod...42546&lngWId=1

you can take a look at it to understand the code and see what you can do with it if you want.

the program was designed to accept connections. i understand that. it has 2 winsock controls, one called sckListen which is listening on port 4500 and another called sckAccept. when sckListen gets a connection request it checks for a free socket in sckAccept (don't really understand that part but thats not my question), then it redirects the connection to sckAccept if there is a free socket.

but i was trying to figure out a way to make it so that it could listen for connections as well as connect to another person with the same program. At first i tried to set it up so that it searched for a free socket just like it does when there is a connection request. it gives me the socket number so i know which one is free and which one to work with so i assign that free socket to connect to a specified ip address, the problem is that it always gives me a message like worng protocol or something like that.

then i even added a new socket control and set it up to connect to another computer with the program but it gives me teh same error message. i know the program works cause i started a new project and added a winsock control and set it to connect to the program and it works fine.

anyone know how i can set it up to connect to another by using a free socket? it like to be able to make it capable of accepting multiple connections as well as making multiple connects.

thanx in advanced!

Multiple Winsock Connections
Right now I'm trying to get a chat server to send a string of data to all connected clients.

The code I have is...

sckWinsock.GetData strData

For X% = 0 To intMaxConnect
If sckWinsock(X%).State = sckConnected Then
sckWinsock(X%).SendData strData
End If
Next X%

For some reason, using that code, Winsock really messes up. When I have two people connected, A and B (B being the second to join), everything A sends is displayed on B, but nothing B sends is shown on A. Please help me out here. Also another weird thing with this code, when I pause the server, and play it again, suddenly client A recieves all the messages typed between. Ugh, hard to explain. Thanks.


Edit: When I have a C connected also, A and B quit receving messages, but the message A and B send are shown on C.

Winsock Multiple Connections
I'm having trouble accepting multiple connections in Winsock.

Here's the code:

Code:
Private Sub Form_Load()
wsServer(0).LocalPort = 4500
wsServer(0).Listen
End Sub

Private Sub wsServer_Close(Index As Integer)
wsServer(Index).Close
End Sub

Private Sub wsServer_ConnectionRequest(Index As Integer, ByVal requestID As Long)
Dim K As Integer

For K = 1 To wsServer.UBound
If wsServer(K).State = sckClosed Then Exit For
Next K

If K = wsServer.UBound + 1 Then
Load wsServer(wsServer.UBound + 1)
End If

wsServer(K).Accept requestID
End Sub

It accepts one(1) connection but a second(2nd) cannot connect.

Am I doing something wrong?

Multiple Connections With Winsock
hey!

i have built a part in my project where several client pcs are to be connected to a server pc. i have done all tha basic steps in order to connect with winsock, but when i try to use indexes the program gives errors. using this code only one connection is possible... how can i modify this code to allow multiple connections (server side code):


Code:
Winsock1.Close
Winsock1.LocalPort = 3333
Winsock1.Listen

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close
Winsock1.Accept requestID

End Sub


Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim remote_user As String
Winsock1.GetData remote_user

lstconnected.AddItem ardata & " @ " & Winsock1.RemoteHostIP

End Sub




also how can i check from the client side if the app has connected to the server and trigger events????

thanks!

Multiple Connections - WinSock
Hi guys i have winsock installed on a program just before i spend hours of time googleing is it possible to make connect to and send a message to more than one server at once with winsock or do i need to place a new instance of it on the form. its a udp connection if that is relevent thanks

Multiple Winsock Connections
Hello there,

Below is the code that I "borrowed" (and I shall offer thank you to the author of it here) and it works, however it only accepts one connection. If someone could edit it to accept multiple connections I would be EVER so greatful!


VB Code:
Option Explicit Private Sub cmdListen_Click()Winsock.LocalPort = 1111       'Open the port on the local machineWinsock.Listen                  'Start listeningEnd Sub   Private Sub Winsock_ConnectionRequest(ByVal requestID As Long)Winsock.Close                   'This resets socket ready to accept the incoming connectionWinsock.Accept requestID        'Accept the connectionEnd Sub Private Sub winsock_DataArrival(ByVal bytesTotal As Long)Dim incomingData As String     'This stores the data we receiveWinsock.GetData incomingData   'This stores the data in the variable we set above 'Now display it in the textbox txtWindow.Text = txtWindow.Text & vbNewLine & incomingDatatxtWindow.SelStart = Len(txtWindow.Text)    'This just positions the text box to focus on the newest piece of informationEnd Sub Private Sub cmdSend_click()Winsock.SendData txtchatBox.Text 'Sends the data in the textbox txtWindow.Text = txtWindow.Text & vbNewLine & txtchatBox.Text 'Displays datatxtWindow.SelStart = Len(txtWindow.Text) ' This just positions the text box to focus on the newest piece of informationtxtchatBox.Text = "" 'Just empties the text box End Sub



Or at least help me edit it to accept multiple connections

Multiple Connections With Winsock
hi all , i'm making a game that i want to be able to play over a lan i want it multiple players to be able to play ( 4 max) and i was wondering do i need a winsock for every player connection ? or can it be done with a single winsock ?

Winsock Multiple Connections Tut
Hi! Iwas wondering if there are any tutorials explaining Winsock.ubound and .lbound and basically the idea of Multiple Connections in detailed.

A site i dont like becasue it's not detailed:
http://www.winsockvb.com
--------------------------------------------

Can anyone help?

Thanks,
EnYcE

Winsock Multiple Requests
I'm building a login system that allows one access to a computer to surf. The server should handle multiple requests, verify a username and password exists then grant access to a machine for a maximum of two hours. Does anyone know how to go about that? Thank you

Winsock Multiple Connections
Hi,

I saw a long time ago on the forums, a code to allow multiple connections
on winsocket. I searched in the forums, but i cant find it .

Maybe someone knows how i can allow multiple connections on winsocket ??


Thanks

GrEeTz TJM

Winsock: Multiple Connections
Hi,
I have tried and tried to make a simple chat with multiple connections and cannot seem to get it all together. This is just for learning. I tried searching on pscode for examples and winsockvb for tutorials and cannot get it to work. Can anyone write a quick multiple connection chat?

Thanks,
WaR_maN3

Multiple Clients Winsock
Hi guys..

I have a kind of a server - client App.. the servers, excepts data, and executes commands depending on the data recived. the problem is there are multiple clients, when these multiple clients tries to acess the server there is an error. how do i hjandle multiple clients with winsock in the server?

p.s - the clients do not really stay conencted for a long time,its not necessary to keep the connection for a long period of time

thanks

Multiple Connections With Winsock
I already setup the server to handle multiple connection requests. I need verification though on whether I have to create another instance of the socket and use that to connect if the server is going to be the one to inititate the connection.

Multiple Connections Using WinSock
How can i define multiple connections using winsock ?! I have for example 5 lients and i wana send data to client nr 2. How can i define the clients command?! please help me! Thanks!

Multiple Connections With Winsock
Hi,

I want to connect to multiple computers through winsock and have them connect to mine...Would I use multiple winsocks to send out data, and just one winsock to listen for incoming data?

Copyright © 2005-08 www.BigResource.com, All rights reserved