Slyck.com
 
Slyck Chatbox - And More

Visual Basic TCP

A place for developers and programmers of file-sharing software to discuss issues.
Forum rules
PLEASE READ BEFORE POSTING: Slyck Forum Rules

Visual Basic TCP

Postby _eAgLe_ » Wed Feb 09, 2005 5:28 am

Hey all, i'm here again looking for more help :roll: . I hope i can get some help here.... Anyways, i am having problems sending data in visual basic using winsock control over a WAN ip address, LAN is fine. I was wandering if anyone one knew how, or if anyone knew a link that i could get some good info from. I am ultimatley going to send files in API Winsock, but at the moment im just using a winsock control and small messages so that i can get used to it and learn.

Anyways, any help will be greatly appreciated.

If there is almost no difference between the LAN and WAN connection code, please tell me what i am doing wrong through WAN....

I hope you understood what i said :)

Now, i have tried WAN through this way, on our router, i have poened port 1214. 1214 is made to the LAN IP of 10.0.0.1 (my pc)
So in my VB program, i have tried connecting the winsock to port 1214 of my WAN IP.. so i think that SHOULD work...... am i right??
i am using TCP protocol.
Anyway any help would be appreciated, thanks.

TIA
User avatar
_eAgLe_
 
Posts: 1190
Joined: Wed Dec 22, 2004 2:06 am

Postby Ooble » Mon Feb 14, 2005 9:19 am

Mind if we see some code? It'll be so much easier to debug. I haven't used VB6 in a while, but I do remember getting Winsock working.
[code:1]char str[20];
scanf("%19s", &str);
if (!strcmpi(str, "Hello, world!"))
printf("Hello, programmer.\n");[/code:1]
User avatar
Ooble
 
Posts: 2372
Joined: Sat Dec 06, 2003 9:33 am
Location: Wouldn't you like to know, SlyckTom? Just so you can sell my address to the RIAA? No chance.

Postby _eAgLe_ » Tue Feb 15, 2005 7:33 pm

Sorry Ooble i've done away with that code now, but i've decided to move on with some Winsock API from http://www.vbip.com, it should give me heeps more control over what i need to do, i think i'll have not too many probs with this, thanks anyway Ooble.
User avatar
_eAgLe_
 
Posts: 1190
Joined: Wed Dec 22, 2004 2:06 am

Postby Ooble » Wed Feb 16, 2005 8:52 pm

Sounds good. I'll remember that site.
[code:1]char str[20];
scanf("%19s", &str);
if (!strcmpi(str, "Hello, world!"))
printf("Hello, programmer.\n");[/code:1]
User avatar
Ooble
 
Posts: 2372
Joined: Sat Dec 06, 2003 9:33 am
Location: Wouldn't you like to know, SlyckTom? Just so you can sell my address to the RIAA? No chance.

Postby no_dammagE » Mon Apr 11, 2005 2:49 pm

If there is almost no difference between the LAN and WAN connection code, please tell me what i am doing wrong through WAN....


There is no difference between LAN and WAN (there are also SANs and MANs, whereby a SAN is something different). A wan is basically a big LAN.

Your problem might be that you are trying to send a packet over a WAN address to a computer on the same LAN. It might not work since AFAIK most switches and routers use the loopback device to access themselves if they have to send data to their own IP. That means that the packet doesn't access the WAN port and your routing device doesn't have a route to lead the packet.

Try to send the data from outside of your LAN. Basically, if it works in LANs, it'll work in WANs, too...unless you are using a token network and your application doesn't proceed giving the token to others ;)
Windows? Blah. Linux? Blah. BSD? Blah.
Just make sure you have a computer licence and I can open your fsckin files.
Vorbis | Theora | LaTeX | OpenDocument
User avatar
no_dammagE
 
Posts: 652
Joined: Sat Jul 05, 2003 9:37 am


Return to Developers Forum

Who is online

Users browsing this forum: No registered users and 2 guests

© 2001-2008 Slyck.com