Thread: returning functions w/ sockets

  1. #1
    JagWire
    Guest

    returning functions w/ sockets

    if anyone is familiar with sockets how would i make a function that returns a socket? like what type would i define the function prototype as and stuff?

  2. #2
    Isn't asocket an unsigned integer?

  3. #3
    Unregistered
    Guest
    no idea

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I think this should work;

    Code:
    SOCKET MyFunction(void){
    
    
    
    }

  5. #5
    from winsock.h

    typedef unsigned int u_int;
    typedef u_int SOCKET;

    don't realy know much about sockets, started only 3 days ago

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An array of macro functions?
    By someprogr in forum C Programming
    Replies: 6
    Last Post: 01-28-2009, 07:05 PM
  2. Replies: 7
    Last Post: 11-17-2008, 01:00 PM
  3. Plz explain difference between functions returning ref
    By dudeomanodude in forum C++ Programming
    Replies: 8
    Last Post: 05-08-2008, 01:03 PM
  4. Passing pointers between functions
    By heygirls_uk in forum C Programming
    Replies: 5
    Last Post: 01-09-2004, 06:58 PM
  5. Class accessor functions returning strings?
    By Shadow12345 in forum C++ Programming
    Replies: 6
    Last Post: 12-31-2001, 12:48 PM