Results 1 to 11 of 11

Thread: IpEndPoint

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Posts
    235

    IpEndPoint

    How to put example 153.32.53.121

    into

    Private _IpEndPoint as new IPEndPoint()??

    the arguments inside as System.net.ipaddress...i put it 153.32.53.121
    inside and got an error

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    VB Code:
    1. Dim ie As New Net.IPEndPoint(Net.IPAddress.Parse("153.32.53.121", Port))
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Posts
    235
    Why is it that I cant send data over..even though I have connected?

    Dim Buffer() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes(ClientMessageTextBox.Text)

    _ClientSocket.Send(Buffer, 0, Buffer.Length, SocketFlags.None)

  4. #4
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    I'm really not the right person to answer network related questions...Sorry.

    But from the looks of it, I'd say that your send is just fine. I suspect that it's the server not listening, or not reacting correctly.

    Try searching MSDN, I believe there's an example of how to make a simple chat program.

    I'm sorry I can't be of more help, but I'm sure there are others here who can.

    Good Luck.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Posts
    235
    Why is it that I cant send data over..even though I have connected?

    Dim Buffer() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes(ClientMessageTextBox.Text)

    _ClientSocket.Send(Buffer, 0, Buffer.Length, SocketFlags.None)

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Posts
    235
    eh...you know how to send a simple character over to the server

  7. #7
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    Not in details. Sorry.

    But I believe I know the principle of it.

    When you connect to the server, the TCPListener creates a TCPClient object. Then you add eventhandlers to it to catch DataRecieved or similiar events.
    Then an event will be raised in the server whenever you send data to it.

    So I think your send function is ok. I think you just haven't created the TCPObject in the server, so the server isn't really listening.

    I will try to find that chat sample and post a link.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  8. #8
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    I found that sample.
    http://msdn.microsoft.com/library/de...et08282001.asp

    There's a lot in there that you probably don't need, but you should focus on establishing the connection, and see how they add handlers (or whatever it is they're doing) to make the server respond to incomming data.

    I hope this helps you.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Posts
    235
    okie...thanks

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Posts
    235
    but now I have to send a character to the server.

    the server is not me...so the configuration is not the same....

    i;m the client part

  11. #11
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Ohh. In that case I'm afraid I'm stumped.
    As far as I can see your send function should be ok. The only other thing I can think of, is that you might be connected to the wrong port or maybe not connected at all?!?

    Sorry.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

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