|
-
Sep 13th, 2000, 03:42 PM
#1
Thread Starter
Lively Member
what is remotehost?, i mean what should i put in for remotehost when connecting to winsock1?
-
Sep 13th, 2000, 05:13 PM
#2
Fanatic Member
Remotehost = the ip of the place you are trying to connect to. RemotePort = the post that you want to use.
ie.
Code:
Dim ip as String
ip = "123.123.123.123"
Dim port As String
port = "12"
Winsock1.Connect ip, port
Hope that helps,
D!m
-
Sep 13th, 2000, 05:20 PM
#3
Thread Starter
Lively Member
thanks for replying me...
i was wondering if the ip address that i have is in the right format mine's 208.46.177.133
and another one... winsock1.localip returns my ip address...
if i cant get my ip through that, why can't i just go
Code:
dim temp
temp = winsock1.localip
winsock1.connect temp
help me
-
Sep 13th, 2000, 07:24 PM
#4
Fanatic Member
Code:
'if you want to go that way, then.
Dim ip As String
ip = Winsock1.LocalIP
Dim port As String
port = "21" 'make sure to specify a correct port
Winsock1.Connenct ip, port
Gl,
D!m
-
Sep 13th, 2000, 09:03 PM
#5
Junior Member
hi..
can you tell me how to choose the port?
ex:
port 0 : ...for what? what it's mean..
port 23:
port 80:
etc..
thanx
-
Sep 13th, 2000, 10:53 PM
#6
Fanatic Member
Well when programming with winsock you usualy have a server and a client. On the server you make the program listen on a specific port and then the client connects to that port.
Code:
Winsock1.LocalPort = "123"
Winsock1.Listen
Then use the previously posted code to attempt to connect to the server.
I can't post the function of all the ports...bt the most commonly used are...
80 - site
21 - ftp
25 - mail server
23 - telnet
1080 - icq
12345 - netbus
31337 - BO
There are well over 65k of them and you would just have to setup your server to listen on one that is not currently being used.
Gl,
D!m
PS. if you want more examples on winsock...search for "winsock" on Planet Source Code
-
Sep 15th, 2000, 02:22 PM
#7
Frenzied Member
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
|