Client waits for http-header

This commit is contained in:
root 2010-06-16 15:06:06 +02:00
parent 60d41aec50
commit edd200248b
3 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,6 @@
SRC = main.cpp sockets/sw_base.cpp sockets/sw_inet.cpp sockets/sw_unix.cpp
OBJ = $(SRC:.cpp=.o)
OUT = Socket
OUT = Client_PLS
INCLUDES =
CCFLAGS = -Wall -Wextra -funsigned-char -g
CC = $(CROSS)g++

View file

@ -12,7 +12,8 @@ int main() {
mySocket.connect("/tmp/socketfile");
char buffer[500000];
int msg;
// do something with mySocket...
std::string input;
while (std::cin >> input && input != "") {}
std::cout << "HTTP/1.1 200 OK\nConnection: close\nContent-Type: video/x-flv\n\n";
while(true) {
msg = mySocket.recv(&buffer[0],10000);

View file

@ -1,6 +1,6 @@
SRC = main.cpp user.cpp sockets/sw_base.cpp sockets/sw_inet.cpp sockets/sw_unix.cpp
OBJ = $(SRC:.cpp=.o)
OUT = Socket
OUT = Server_PLS
INCLUDES =
CCFLAGS = -Wall -Wextra -funsigned-char -g
CC = $(CROSS)g++