Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HI. I'm creating a simple chatroom

Status
Not open for further replies.

CyChosis

Programmer
Jan 16, 2003
5
0
0
US
HI. I'm creating a simple chatroom application, but I've never used the winsock control before. The problem I am having is that when I assign the remoteHostIP property to an IP address like this:
tcpClient.RemoteHostIP = "127.15.34.1"
I get an error message that says "wrong number of arguments or invalid property assignment." The examples I've found on the web are written exactly the same, so I don't know what the deal is.

On a less important note, what's with the .remoteHost property? The client could never be expected to find the server with only the computer's "name"... So what good is this? I'm just curious about this one because apparantly I don't understand it, the other question is the important one.
 
Use the .remotehost property instead of the .remotehostIP property when assigning the IP address. Typically, the .remotehostIP property is used to obtain the address, such as when a UDP message has been received.

The remotehost property can be assigned a value of "127.15.34.1"... machine names are more often used when connecting to a PC on your LAN. [fish] No Dolphins were harmed in the posting of this message... Dolphin Friendly Tuna!
 
Thank you much Tuna, but now I'm still having a problem with it. When I have the client and server both running on the server computer, the program works fine, but when I try to connect to the server from a client on another computer I get an error message stating "Network Subsystem Failed" (in Winsock). Do you know why this might be?
(The server I'm connecting to is a direct connection, so the IP address is static.)
 
Lets take a look at your code...

Also, is the error generated on the client or on the server? I'm sure it is on the client side, but I want to be sure.

[fish] No Dolphins were harmed in the posting of this message... Dolphin Friendly Tuna!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top