Results 1 to 4 of 4

Thread: Winsock Problems in .NET?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    2

    Question Winsock Problems in .NET?

    For some unknown reason vb.NET decides that each time I send a certain set of characters via the .SendData it will "lose" the IP.
    Here's a bit of background:

    I'm connecting via UDP
    Remote port is variable (27015 for example)
    Local port is bound to 554
    I can send everything EXCEPT the characters I need to send to initiate the connection, "ÿÿÿÿ" <---ByteCode minus the quotes.

    The code is nothing more than
    PHP Code:
    ---sub for connect seq------
    wskRCon.RemoteHost txtIP.Text
    wskRCon
    .RemotePort txtPort.Text
    wskRCon
    .Bind(554)
    sendchallenge
    ----sendchallenge sub-------
    wskRCon.SendData(ByteCode "challenge rcon"
    I even setup a message box to see if it lost the IP before or after I sent the ByteCode. Its always after. Like I said, I can send ANYTHING but the ÿÿÿÿ. This code had worked in VB6 with no probs (much like everything else). Any ideas?

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    winsock is obsolete..look into the System.Net.Sockets classes for info on udp and tcp communications.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    2
    Originally posted by Cander
    winsock is obsolete..look into the System.Net.Sockets classes for info on udp and tcp communications.
    DOH!
    That's not what I wanted to hear. I'm starting to not like .NET. All this extra stuff to learn. Ugh.

    Thanks for the info though........

    Know of any good tutorials?

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    I dont have any specific links..but if you goto

    http://www.planet-source-code.com

    and goto the .NET section, you can search for tcp and or socket

    and you will find plenty of examples there.. one of em is from me Chris Andersen..but dont use that one as there are some errors i just never got around to fixing.. :P
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

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