Results 1 to 13 of 13

Thread: TCP & UDP Difference

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    35

    TCP & UDP Difference

    ello evrybody! i'm newly registered user in this forum...

    winsock prorgramming is my favorite part in vb, and im only using tcpProtocol in my programs, but i want to know it's differnce from UDP, i haven't tried yet udpProtocol...

    please explain me further about this matter...

    Thankz....

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: TCP & UDP Difference

    Welcome to the forums,

    I like you really enjoyed winsock in Vb6 and found it an interesting part of programming, I have moved to .NET now so its been a while. Anyhows enough of my life story,

    UDP - Is connectionless, and coannot establish a connection. TCP has to be connected.

    (This is you wisock.Listen, and winsock.connect routine)

    Udp is faster than TCP, (For small apckets of data)

    UDP packets are not guarenteed to get to there destination, they may be lost on way. TCP is 99% guaranteed to get there.

    So really UDP is faster but not as safe as TCP. If you are writing somthing such as a chat application go with TCP, UDP is sued in the game sindustry becasue if a client misses a packet they can catch up on the next one (In high action games)

    Hope that gives you a little help

    Liam

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    35

    Re: TCP & UDP Difference

    Thankz a lot pino...

    I've read a lot of your threads and msg,
    juz wanna ask you one more thing bout winsock...

    Can winsock have the capability to connect a client with a server tru internet or wan??

    then if so, what IP address, port no or sumthin' will used to connect,,,
    cuz i know accdg to my Cisco prof, that in WAN, internal IP address
    of the local computer remains private when it is connected to net,
    cuz it uses Gateways, Subnets, Network address, and other Protocols of WAN...

    Thankx again...

    BuB'

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: TCP & UDP Difference

    Hmm yes its should be able to I've never tried it over a WAN but have ove rthe internet (Just use the standard IP (www.Whatismyip.com)) and over lan you can just use the ip you get from ipConfig.

    As i say i'm not sure about WAN i understand briefly what they are but have no experiance using them.

    Hope that helps you

    Pino

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    35

    Re: TCP & UDP Difference

    Oh, ic...

    well, maybe i should research some more info bout WAN programming over winsock..

    thankz for helpin'... if there anybody can contribute bout my concern, or anybody knows bout it, your comment and help will greatly appreciate...

    thankz..

    BuB'

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: TCP & UDP Difference

    The Internet is a WAN , so yes, winsock can be used to connect over a WAN. Its the job of the routers and gateways to route IP datagrams to their correct destination, not your application. So as long as you know the IP address or the host name of the client / server you wish to connect to, there is no problem.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: TCP & UDP Difference

    Thats what i suspected. But wasnt 100% cheers visualAd

  8. #8

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    35

    Cool Re: TCP & UDP Difference

    yeah... right! but i don't even got any idea on how to access to a WAN connection since i only know LAN and winsock connection...

    Here's what i want,,, i've almost finished my project in VB, a Client/Server Timer prorgram for my Friend's Internet Cafe' that will automatically lock, unlock and release a remote host over LAN, now, He got 2 branches of the cafe' , couple of Km apart (to0 impractical to connect it using LAN) anyway, i want them both connected using my program, my only prob is... no, the BIG problem is to connect it over WAN or internet... any more help??....

    thankz for comments - appreciated...

    by the way I am using a DSL connection...

    Thatz ol...

    BuB'


  9. #9
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: TCP & UDP Difference

    Using winsock ove rthe internet is no differanat than using it over a lan.


  10. #10
    New Member
    Join Date
    Jul 2005
    Posts
    6

    Re: TCP & UDP Difference

    Quote Originally Posted by Pino
    Using winsock ove rthe internet is no differanat than using it over a lan.

    I wish it was no different. haha. computers behind routers are giving me a really hard time because several computer have the same IP.
    apolly: if both of the computers aren't behind a router, go to www.whatismyip.com and use the ip you see there to connect. if they are... i can't help you (i'm trying to figure that one out as we type).

  11. #11
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: TCP & UDP Difference

    Quote Originally Posted by daytripper
    I wish it was no different. haha. computers behind routers are giving me a really hard time because several computer have the same IP.
    apolly: if both of the computers aren't behind a router, go to www.whatismyip.com and use the ip you see there to connect. if they are... i can't help you (i'm trying to figure that one out as we type).
    Try the routers port forwarding control, I have a webserver/ftp sever running on one of my pc's behind a router. I just foward all data on a certain port to the local IP of my server computer.

    It really is no differnace in the use of winsock. Hardware configurations are the users problem

  12. #12
    New Member
    Join Date
    Jul 2005
    Posts
    6

    Re: TCP & UDP Difference

    Quote Originally Posted by Pino
    Try the routers port forwarding control, I have a webserver/ftp sever running on one of my pc's behind a router. I just foward all data on a certain port to the local IP of my server computer.

    It really is no differnace in the use of winsock. Hardware configurations are the users problem
    thank you for the advice, i heard about doing that but it's not user friendly... at all. people hear the word "configurations" and go "ahhhhhhh!!!!". haha. i made another topic last night asking for another way. i don't think anyone's responded.

  13. #13
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: TCP & UDP Difference

    I hope you could find something useful here.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width