Finished video depacketizing. Starting tests

This commit is contained in:
Cameron Gutman
2014-01-18 23:09:28 -05:00
parent 77b08df4be
commit 2e971e102a
10 changed files with 237 additions and 22 deletions

View File

@@ -1,5 +1,25 @@
#include "PlatformSockets.h"
SOCKET bindUdpSocket(unsigned short port) {
SOCKET s;
struct sockaddr_in addr;
s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (s == INVALID_SOCKET) {
return INVALID_SOCKET;
}
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(port);
if (bind(s, (struct sockaddr*) &addr, sizeof(addr)) == SOCKET_ERROR) {
closesocket(s);
return INVALID_SOCKET;
}
return s;
}
SOCKET connectTcpSocket(IP_ADDRESS dstaddr, unsigned short port) {
SOCKET s;
struct sockaddr_in addr;