returning functions w/ sockets

This is a discussion on returning functions w/ sockets within the Windows Programming forums, part of the Platform Specific Boards category; if anyone is familiar with sockets how would i make a function that returns a socket? like what type would ...

  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
    Banned maes's Avatar
    Join Date
    Aug 2001
    Posts
    744
    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,789
    I think this should work;

    Code:
    SOCKET MyFunction(void){
    
    
    
    }

  5. #5
    Banned maes's Avatar
    Join Date
    Aug 2001
    Posts
    744
    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, 02: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21