|
-
Feb 15th, 2005, 04:04 PM
#1
Thread Starter
New Member
Client-Server Data via Winsock
Hi. I'm new to using winsock, but not to VB. I've found (and used) lots of code to make the winsock server and client. But, I can't find anything on the actual data transmission between client and server. Are there any help, tips, tricks, tutorials, etc., that you'd recommend?
So far, it looks to me like you just embed all you want to send in a string, decode it on the other end, jiggle it, re-string it, then send it back. Is that about it?
My server will be using ADO with a SQL Server 2000 backend.
So, any advice will be much appreciated!
Alf
-
Feb 15th, 2005, 04:32 PM
#2
Re: Client-Server Data via Winsock
 Originally Posted by AlfFlowers
Hi. I'm new to using winsock, but not to VB. I've found (and used) lots of code to make the winsock server and client. But, I can't find anything on the actual data transmission between client and server. Are there any help, tips, tricks, tutorials, etc., that you'd recommend?
So far, it looks to me like you just embed all you want to send in a string, decode it on the other end, jiggle it, re-string it, then send it back. Is that about it?
My server will be using ADO with a SQL Server 2000 backend.
So, any advice will be much appreciated!
Alf
Yea you got it right, i like to send my data in a big string like "me,you,25,78" and then use the Split() function (see my sig on useful vb functions) to seperate all the commands.
I'm not sure what you are having problems with or are you just after general advice?
Pino
-
Feb 15th, 2005, 04:53 PM
#3
Thread Starter
New Member
Re: Client-Server Data via Winsock
Hi, Pino. Thanks for the reply. I basically just needed to know how to start. I can get the data from the client to the server (and back again). But, I am not sure about decoding the strings. I've never used split(), so I'll check it out. So, this works sorta like the old mscomm control, where you just sent a string of data then decoded it??
Instead of asking more questions now, I'll get the split function and see if this tells me what I need to know.
Thanks again!
Alf
-
Feb 15th, 2005, 04:56 PM
#4
Re: Client-Server Data via Winsock
 Originally Posted by AlfFlowers
Hi, Pino. Thanks for the reply. I basically just needed to know how to start. I can get the data from the client to the server (and back again). But, I am not sure about decoding the strings. I've never used split(), so I'll check it out. So, this works sorta like the old mscomm control, where you just sent a string of data then decoded it??
Instead of asking more questions now, I'll get the split function and see if this tells me what I need to know.
Thanks again!
Alf
How do you mean decode? if i send a string "hello" to the client it will come out as "hello". I'm not sure what you actually mean?
-
Feb 15th, 2005, 05:07 PM
#5
Thread Starter
New Member
Re: Client-Server Data via Winsock
For example, the first thing I have to do after making a connection is prompt the user for their employee ID (via text box). Then send that EmpID to the SQL Server for authentication. Once authenticated, I next have to display on the client the user's menu of 4 choices. One of those choices will require sending a part number to the server. The server will use that PartNo to return the description, warehouse location, and qty available to the client. Since each transmission between the winsock client and server is essentially a single string of data made up of several fields, I need to parse each transmission for each piece of data.
Please let me know if this doesn't make sense!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|