Results 1 to 9 of 9

Thread: [RESOLVED] Socket Programming Help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Location
    UAE
    Posts
    191

    Resolved [RESOLVED] Socket Programming Help

    Hii all,

    After a long time I came back with jumping to VB.net from VB6. I want to make the project in VB.net or in C#.net which can communicate in LAN to chat with others. I have already done this thing in VB6 using Winsock control but here I dont know which control or which method I have to use.

    Can any one show me the path from where I can start the journey to socket programming.

    Thank you my helper.
    Each New Difficulty Is Best Opportunity,
    If You Ignore Solving It,
    You Lost Your Life's Best Opportunity.
    _______________________________________
    Dynamic Property value assignment - C#
    TCP client/server connection

    CatchIt-Game
    Fortunes
    SQL Tutorials

  2. #2
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Socket Programming Help

    did you try searching here? there are a lot of threads that might show you what you want.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Socket Programming Help

    First you have to decide whether you are using TCP with connections, or UDP which is connectionless. UDP is somewhat easier, but it gets kind of tricky if the message size gets too big, which seems likely for sending text messages between people.

    If connections are ok, then search this forum on TCPClient or TCPListener, as those are the two classes you will be using. For UDP, you can look for threads started by me with UDP in them in the networking section where I posted a working class that I am using in a robot.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Location
    UAE
    Posts
    191

    Re: Socket Programming Help

    Oh thanks shaggy.... I am tired after trying socket coding for whole day....

    Let's try with TCPClient and TCPListener....

    Can you give me come sample code for TCPClient
    Each New Difficulty Is Best Opportunity,
    If You Ignore Solving It,
    You Lost Your Life's Best Opportunity.
    _______________________________________
    Dynamic Property value assignment - C#
    TCP client/server connection

    CatchIt-Game
    Fortunes
    SQL Tutorials

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Location
    UAE
    Posts
    191

    Re: Socket Programming Help

    As you told I could transfer only 10 kb to 125 kb approximately...
    Each New Difficulty Is Best Opportunity,
    If You Ignore Solving It,
    You Lost Your Life's Best Opportunity.
    _______________________________________
    Dynamic Property value assignment - C#
    TCP client/server connection

    CatchIt-Game
    Fortunes
    SQL Tutorials

  6. #6
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Socket Programming Help

    You've created an identical thread in the C# forum, where I've pointed you to the link in my signature.

    You should try to avoid creating duplicate threads
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  7. #7
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Socket Programming Help

    ishrar - are you trying to do one write that is 10 - 125 KB?
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  8. #8
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Socket Programming Help

    That size rules out any reasonable UDP, and Atheist does seem to have the most complete TCP examples I have seen, so I'll leave at this point.
    My usual boring signature: Nothing

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Location
    UAE
    Posts
    191

    Re: Socket Programming Help

    Using tcpclient and tcplistener I got solution to my problem...

    Now application is ready.

    Thank you all....
    Each New Difficulty Is Best Opportunity,
    If You Ignore Solving It,
    You Lost Your Life's Best Opportunity.
    _______________________________________
    Dynamic Property value assignment - C#
    TCP client/server connection

    CatchIt-Game
    Fortunes
    SQL Tutorials

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