Bind error : Address already in use problem - Networking

This is a discussion on Bind error : Address already in use problem - Networking ; In my program: The parent process acts as a server The child (forked process) acts as a client When I try to bind a socket to a port and IP of my machine I am getting Address already in use ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Bind error : Address already in use problem

  1. Bind error : Address already in use problem

    In my program:

    The parent process acts as a server
    The child (forked process) acts as a client
    When I try to bind a socket to a port and IP of my machine I am
    getting Address already in use error.
    I have tried different port numbers too but that was of no avail.

    Can someone help ! I used 2004,2006,3000, 5005 ports.

    Ankur


  2. Re: Bind error : Address already in use problem

    On 2月16日, 上午10时36分, "ankur" wrote:
    > In my program:
    >
    > The parent process acts as a server
    > The child (forked process) acts as a client
    > When I try to bind a socket to a port and IP of my machine I am
    > getting Address already in use error.
    > I have tried different port numbers too but that was of no avail.
    >
    > Can someone help ! I used 2004,2006,3000, 5005 ports.
    >

    Are you sure that you haven't bind to a port twice? Only server need
    to do bind, the client just need to connect or sendto(UDP).

    Anyway, some code from you may help more.
    > Ankur




+ Reply to Thread