first winsock program

project 32
09-16-2001, 10:30 PM
im making my first winsock program and when i try to send data to my server from my client, it doesnt seem to work, im doing this over network and i can run other servr/client programs.

i think my problem is i cant connect to the server program from the client, i have a button to check the state and it just says its in state '6' i dont know what that means,

i have enclosed my program, if you could pleease get it to work and comment in how you got it to work i would be really greatful,,

im using windows ME if that causes a problem, i know ME is kinda screwey at times

project 32
09-16-2001, 10:41 PM
ok, i forgot to mention (i think the reason for this is because i cant connct correctly) well, when i hit the send data button i get a weird error saying im not connected in the proper method or sompthing

ChiefRedBull
09-17-2001, 09:10 AM
I'll have a look when i get home...

Chief

"Junior Contributor?? Argh...... ***.. ***.... I preferred 'Centurion'! So much more...."

ChiefRedBull
09-17-2001, 12:05 PM
Howdy. There were several errors in there.

For example - you had named your Winsock "WinServ", yet were referring to it in your code as "tcpServer". As thus it was not finding it.

Also - you had set your server like this

WinServ.RemotePort = 100
WinServ.Listen

When listening you need to set the LCOAL port, then listen.

I also added a loop to make sure youre connected properly before doing anything.

It works now.... images/icons/smile.gif

Chief

"Junior Contributor?? Argh...... ***.. ***.... I preferred 'Centurion'! So much more...."

project 32
09-17-2001, 05:46 PM
thank you SOOO much, i havent tried it yet but if u say it works, thank u so much

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum