Thread: few questions in Network Programming

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    1

    few questions in Network Programming

    hey everyone,

    recently i've started learning about sockets and i have some questions:

    - what does the function Socket.Bind(EndPoint) do?

    - how can i change my clients Port? it seems to be random...

    - can i use two sockets on the same application? two sockets on the same port (server side)?

    - why cant i bind my server's socket to a diffrent port? in order to do so i closed the socket created a new one and used the bind function on it with the new port...

    thanks in advance,

    dor.

  2. #2
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Typically you call bind in order to set the IP, port etc etc of the client, so you can use the Socket.Listen method to listen from the connection. EndPoint is the object that has all the information.

    I don't know more details. Are you setting the port/IP somehow?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  2. Need help with easy Network setup
    By the dead tree in forum Tech Board
    Replies: 9
    Last Post: 04-08-2005, 07:44 PM
  3. Trivial questions - what to do?
    By Aerie in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 12-26-2004, 09:44 AM
  4. network problems
    By lucy in forum Tech Board
    Replies: 6
    Last Post: 01-01-2003, 03:33 PM
  5. WinXP Network Connections pop-up
    By DavidP in forum Tech Board
    Replies: 1
    Last Post: 10-02-2002, 05:36 PM