Back to index

courier  0.68.2
Functions
testprog.c File Reference
#include "soxwrap.h"
#include <stdlib.h>
#include <stdio.h>

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 11 of file testprog.c.

{
int    fd=sox_socket(PF_INET, SOCK_STREAM, 0);
struct sockaddr addr;
socklen_t     addr_len;

       if (fd < 0)
       {
              perror("socket");
              exit(1);
       }

       addr_len=sizeof(addr);

       if (sox_getsockname(fd, &addr, &addr_len))
       {
              perror("getsockname");
              exit(1);
       }

       sox_close(fd);
       exit(0);
       return (0);
}