Client waits for http-header
This commit is contained in:
parent
60d41aec50
commit
edd200248b
3 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
SRC = main.cpp sockets/sw_base.cpp sockets/sw_inet.cpp sockets/sw_unix.cpp
|
SRC = main.cpp sockets/sw_base.cpp sockets/sw_inet.cpp sockets/sw_unix.cpp
|
||||||
OBJ = $(SRC:.cpp=.o)
|
OBJ = $(SRC:.cpp=.o)
|
||||||
OUT = Socket
|
OUT = Client_PLS
|
||||||
INCLUDES =
|
INCLUDES =
|
||||||
CCFLAGS = -Wall -Wextra -funsigned-char -g
|
CCFLAGS = -Wall -Wextra -funsigned-char -g
|
||||||
CC = $(CROSS)g++
|
CC = $(CROSS)g++
|
||||||
|
|
|
@ -12,7 +12,8 @@ int main() {
|
||||||
mySocket.connect("/tmp/socketfile");
|
mySocket.connect("/tmp/socketfile");
|
||||||
char buffer[500000];
|
char buffer[500000];
|
||||||
int msg;
|
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";
|
std::cout << "HTTP/1.1 200 OK\nConnection: close\nContent-Type: video/x-flv\n\n";
|
||||||
while(true) {
|
while(true) {
|
||||||
msg = mySocket.recv(&buffer[0],10000);
|
msg = mySocket.recv(&buffer[0],10000);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
SRC = main.cpp user.cpp sockets/sw_base.cpp sockets/sw_inet.cpp sockets/sw_unix.cpp
|
SRC = main.cpp user.cpp sockets/sw_base.cpp sockets/sw_inet.cpp sockets/sw_unix.cpp
|
||||||
OBJ = $(SRC:.cpp=.o)
|
OBJ = $(SRC:.cpp=.o)
|
||||||
OUT = Socket
|
OUT = Server_PLS
|
||||||
INCLUDES =
|
INCLUDES =
|
||||||
CCFLAGS = -Wall -Wextra -funsigned-char -g
|
CCFLAGS = -Wall -Wextra -funsigned-char -g
|
||||||
CC = $(CROSS)g++
|
CC = $(CROSS)g++
|
||||||
|
|
Loading…
Add table
Reference in a new issue