|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dear forum members,
The other day I tried to build the WinSocket "chat" program as described by Jason BrimbleComb. It seems that I am having troubles with the part that checks if connection failed or has been established. Could someone help me ? Edward Mulder |
|
#2
|
|||
|
|||
|
Hi Edward,
I'm not experienced with the topic you're asking for help on, but I tought I'd just ask (before someone else does) if you could explain more specific what troubles you are having.. Error messages, etc.. ![]() Good luck!
__________________
Best Regards, Håvard Lindset |
|
#3
|
|||
|
|||
|
Hello Lindset,
The part that does not respond is the part: "Connection Established" / "Connection Failed" in the cmdCOnnect_Click() method. I have attached the program I made. Thanks, Edward |
|
#4
|
|||
|
|||
|
Hi Ed,
Are you testing both the client and server on your local machine (i.e. 127.0.0.1)? If so, make sure that the server is started first and then start the client. It also helps if the server connects to the NetBIOS name of your computer, such as MYPC1. This avoids network conflicts at the socket level for naming. You can get the NetBIOS name of your PC by right clicking on network neighbourhood -> identity. hope this helps. if not, let me know. ![]() |
|
#5
|
|||
|
|||
|
Hi Mytch,
Indeed, I tried to run 2 instances of the program on my PC to see if thinks work. I've tried the NetBIOS name but there's no difference. It seems the program waits forever for "socket connected/failed". Greetings, Edward |
|
#6
|
|||
|
|||
|
Hi Ed,
looked through your code and found something that might be of use. in the cmdConnect click event you have set remotehost and remoteport settings for the winsock control. then your code says to wait for the controls state to change, perhaps you should try putting the connect command in. |
|
#7
|
|||
|
|||
|
Thanks evlbob.
That did the job. As you notice this is my second VB program.... Next thing is to merge it with my COM1 routines and to hook it up to my microcontroller board. Greetings, Edward |
|
#8
|
|||
|
|||
|
sounds like fun, but I wonder what it is you are trying to do. can you tell us or is it top secret
![]() |
|
#9
|
|||
|
|||
|
No it's not top secret - not yet ! Well here's the deal:
- microcontroller (PIC) that drives 20 displays (7x5 pixel) - microcontroller has a serial input (RS232) from a PC - PC sends an ASCII text string to be displayed - PC runs a client that accepts the text string via TCP/IP In this way I have a 20-line text display that shows user texts that are sent over our LAN. When that all works, I plan to dedicate an IP-number to my PC. The system administrator obliges me to have a twisted pair directly from the router, BEFORE entering our firewall server. Final goal is to have a *whatever* equipment connected to a PC that can be commanded via the Internet. It should all be simple enough to allow students to write and modify the sources. That's why I have chosen VB. Edward |
|
#10
|
|||
|
|||
|
interesting, hope everything goes smoothly
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > WinSocket Chat application |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|