Thread: Winsock Daemon

  1. #1

    Winsock Daemon

    How do I open up a port with Winsock?
    What will people say if they hear that I'm a Jesus freak?
    What will people do if they find that it's true?
    I don't really care if they label me a Jesus freak, there is no disguising the truth!

    Jesus Freak, D.C. Talk

    -gnu-ehacks

  2. #2
    jiinx
    Guest

    This way

    you need to define your port number as such:

    #define PORT 31337


    Now you need to struct your servers info:

    struct sockaddr_in server


    Then you need to open it by:

    server.sin_port = htons(PORT); //htons* is a conversion

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Winsock issues
    By tjpanda in forum Windows Programming
    Replies: 3
    Last Post: 12-04-2008, 08:32 AM
  2. Winsock Messaging Program
    By Morgul in forum Windows Programming
    Replies: 13
    Last Post: 04-25-2005, 04:00 PM
  3. Where do I initialize Winsock and catch messages for it?
    By Lithorien in forum Windows Programming
    Replies: 10
    Last Post: 12-30-2004, 12:11 PM
  4. Daemon problem
    By gandalf_bar in forum Linux Programming
    Replies: 3
    Last Post: 07-20-2004, 06:23 AM
  5. winsock
    By pode in forum Networking/Device Communication
    Replies: 2
    Last Post: 09-26-2003, 12:45 AM