Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
cab5a4a1
Commit
cab5a4a1
authored
Dec 09, 2009
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor documentation updates
parent
c98e29fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
README
examples/chat/README
+2
-2
encoder.hpp
src/encoder.hpp
+6
-6
No files found.
examples/chat/README
View file @
cab5a4a1
This example is a simple instant messaging implementation. There are multiple
partipants in the chat, both sending and reading messages. The sending
application 'prompt' is separated from the application displayin
f
the chat
application 'prompt' is separated from the application displayin
g
the chat
'display' so that there's no need for sophisticated GUI.
To run the example you'll need both applications plus the 'forwarder' device
...
...
@@ -12,7 +12,7 @@ $ ./configure --with-chat --with-forwarder
$ make
$ sudo make install
Once it is buil
d
create the configuration file (say config.xml) for the
Once it is buil
t
create the configuration file (say config.xml) for the
forwarder describing which network endpoints are to be used for incoming and
outgoing messages:
...
...
src/encoder.hpp
View file @
cab5a4a1
...
...
@@ -24,8 +24,6 @@
#include <string.h>
#include <algorithm>
#include <stdio.h>
namespace
zmq
{
...
...
@@ -42,10 +40,12 @@ namespace zmq
}
// The function tries to fill the supplied chunk by binary data.
// Returns the size of data actually filled in. If offset is not
// NULL, it is filled by offset of the first message in the batch.
// If there's no beginning of a message in the batch, offset is
// set to -1.
// If offset is not NULL, it is filled by offset of the first message
// in the batch. If there's no beginning of a message in the batch,
// offset is set to -1. Both data_ and size_ are in/out parameters.
// Upon exit, data_ contains actual position of the data read (may
// be different from the position requested) and size_ contains number
// of bytes actually provided.
inline
void
read
(
unsigned
char
**
data_
,
size_t
*
size_
,
int
*
offset_
=
NULL
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment