2019-09-17 19:24:46 +00:00
|
|
|
#ifndef __SOCK__
|
|
|
|
#define __SOCK__
|
|
|
|
|
|
|
|
#include "stdio.h"
|
|
|
|
#ifdef linux
|
2019-09-20 14:49:21 +00:00
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <sys/uio.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/ip.h>
|
|
|
|
#include <netinet/tcp.h>
|
|
|
|
#include <errno.h>
|
2019-09-17 19:24:46 +00:00
|
|
|
typedef int Sock;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef WIN32
|
|
|
|
#include <winsock2.h>
|
|
|
|
#include <Windows.h>
|
|
|
|
typedef SOCKET Sock;
|
|
|
|
#endif
|
|
|
|
Sock Connect(char *ip,int port);
|
|
|
|
int Send(Sock s,char*dat, int len);
|
|
|
|
int Recv(Sock s,char *rec,int len);
|
2019-09-20 14:49:21 +00:00
|
|
|
int CloseConn(Sock s);
|
2019-09-17 19:24:46 +00:00
|
|
|
/*
|
|
|
|
ANNOUNCE rtsp://118.24.238.198:554/Sword RTSP/1.0
|
|
|
|
CSeq: 1
|
|
|
|
User-Agent: EasyPusher v1.2.16.1105
|
|
|
|
Content-Type: application/sdp
|
|
|
|
Content-Length: 384
|
|
|
|
|
|
|
|
v=0
|
|
|
|
o=- 0 0 IN IP4 127.0.0.1
|
|
|
|
s=EasyDarwin
|
|
|
|
i=EasyDarwin
|
|
|
|
c=IN IP4 127.0.0.1
|
|
|
|
t=0 0
|
|
|
|
a=x-qt-text-nam:EasyDarwin
|
|
|
|
a=x-qt-text-inf:EasyDarwin
|
|
|
|
a=x-qt-text-cmt:source application::EasyDarwin
|
|
|
|
a=x-qt-text-aut:
|
|
|
|
a=x-qt-text-cpy:
|
|
|
|
m=video 0 RTP/AVP 96
|
|
|
|
a=rtpmap:96 H264/90000
|
|
|
|
a=fmtp:96 packetization-mode=1;sprop-parameter-sets=,2QAKKy0A8ARPywgAAADACAAAAMD0eMGVA==
|
|
|
|
a=control:streamid=0
|
|
|
|
|
|
|
|
ANNOUNCE rtsp://118.24.238.198:554/Sword RTSP/1.0
|
|
|
|
CSeq: 1
|
|
|
|
User-Agent: EasyPusher v1.2.16.1105
|
|
|
|
Content-Type: application/sdp
|
|
|
|
Content-Length: 384
|
|
|
|
|
|
|
|
v=0
|
|
|
|
o=- 0 0 IN IP4 127.0.0.1
|
|
|
|
s=EasyDarwin
|
|
|
|
i=EasyDarwin
|
|
|
|
c=IN IP4 127.0.0.1
|
|
|
|
t=0 0
|
|
|
|
a=x-qt-text-nam:EasyDarwin
|
|
|
|
a=x-qt-text-inf:EasyDarwin
|
|
|
|
a=x-qt-text-cmt:source application::EasyDarwin
|
|
|
|
a=x-qt-text-aut:
|
|
|
|
a=x-qt-text-cpy:
|
|
|
|
m=video 0 RTP/AVP 96
|
|
|
|
a=rtpmap:96 H264/90000
|
|
|
|
a=fmtp:96 packetization-mode=1;sprop-parameter-sets=,2QAKKy0A8ARPywgAAADACAAAAMD0eMGVA==
|
|
|
|
a=control:streamid=0
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2019-09-20 14:49:21 +00:00
|
|
|
#endif
|