How to add new Socket ?

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
brizio
Blank Cone
Blank Cone
Posts: 27
Joined: 13 Oct 2009 13:46

How to add new Socket ?

Postby brizio » 03 Dec 2009 12:49

Hi all,
i want to create another thread in vlc 1.0.2 which contains a socket listening on a port for some encoder parameters used by vlc during the encoding, with the aim of change them at runtime, without kill the encoder process..
I'm compiling on WinXP using MINGW http://wiki.videolan.org/Win32CompileMSYSNew
I can successfully compile the source code, but know i've added the code for the new socket (it's not ended but just for test)

Code: Select all

#include <sys/types.h> #include <unistd.h> #include <sys/socket.h> #include <sys/uio.h> #include <sys/un.h> #include <netinet/in.h> #include <pthread.h> ... ... static int StartSocket( ) { struct sockaddr_in server,client; char buffer[50]; int socket = socket (AF_INET, SOCK_STREAM, 0); server.sin_family = AF_INET; server.sin_addr.s_addr = INADDR_ANY; server.sin_port = htons(SERVER_PORT); bind(socket, (struct sockaddr *)&server, sizeof(server)); listen(socket, 1); while(1) { int req=accept(sock, (struct sockaddr *)&client, &client_len); int lenght=recv(req, buffer, 50, 0); } }
in compiling phase, minsys can't find sys/socket.h,sys/uio.h,sys/un.h,netinet/in.h

Should i use a predefined types for vlc instead the one i've done? I've seen that in other files of source code the included file which are missing, seems to be correctly found....
Thanks for your help!

brizio

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: How to add new Socket ?

Postby thannoy » 03 Dec 2009 14:03

Please, please never cross post to two forums. Find what you think is the better place and post it only once.

@duplicated: viewtopic.php?f=2&t=68746


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot] and 43 guests