1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00
This commit is contained in:
psyc://psyced.org/~lynX 2011-04-28 15:20:07 +02:00
parent b362a999ce
commit d4c44936de
3 changed files with 9 additions and 7 deletions

View file

@ -146,13 +146,13 @@ typedef struct
/* intermediate struct for a PSYC packet */ /* intermediate struct for a PSYC packet */
typedef struct typedef struct
{ {
psycHeader routing; ///< Routing header. psycHeader routing; ///< Routing header.
psycHeader entity; ///< Entitiy header. psycHeader entity; ///< Entity header.
psycString method; psycString method;
psycString data; psycString data;
size_t routingLength; ///< Length of routing part. size_t routingLength; ///< Length of routing part.
size_t contentLength; ///< Length of content part. size_t contentLength; ///< Length of content part.
size_t length; ///< Total length of packet. size_t length; ///< Total length of packet.
psycPacketFlag flag; psycPacketFlag flag;
} psycPacket; } psycPacket;

View file

@ -16,10 +16,10 @@ nettest:
for f in packets/full-* packets/error-*; do echo ">> $$f"; cat $$f | nc localhost $(PORT); done for f in packets/full-* packets/error-*; do echo ">> $$f"; cat $$f | nc localhost $(PORT); done
nettestp1: nettestp1:
(for f in packets/part-1-p*; do cat $$f; done) | nc nb $(PORT) (for f in packets/part-1-p*; do cat $$f; done) | nc localhost $(PORT)
nettestp2: nettestp2:
(for f in packets/part-1-length-p*; do cat $$f; done) | nc nb $(PORT) (for f in packets/part-1-length-p*; do cat $$f; done) | nc localhost $(PORT)
clean: clean:
rm -f $(TARGETS) rm -f $(TARGETS)

View file

@ -1,6 +1,8 @@
/** /**
* libpsyc test server for packet parsing & rendering * libpsyc test server for packet parsing & rendering
*
* based on selectserver.c from http://beej.us/guide/bgnet/ * based on selectserver.c from http://beej.us/guide/bgnet/
* "The C source code presented in this document is hereby granted to the public domain, and is completely free of any license restriction."
*/ */
#include <stdio.h> #include <stdio.h>