summaryrefslogtreecommitdiff
path: root/src/common/netbuffer.h
diff options
context:
space:
mode:
authorgreenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-25 21:20:43 +0000
committergreenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-25 21:20:43 +0000
commitb11bf6e1604097711291265f927e79e8f2af5c54 (patch)
tree6eac67dfe94b2cef4e48f59c1bf448a321ce24cd /src/common/netbuffer.h
parentd9c5c4784a0abc43fb9e01f365a0d8b3a15a0692 (diff)
downloadhercules-b11bf6e1604097711291265f927e79e8f2af5c54.tar.gz
hercules-b11bf6e1604097711291265f927e79e8f2af5c54.tar.bz2
hercules-b11bf6e1604097711291265f927e79e8f2af5c54.tar.xz
hercules-b11bf6e1604097711291265f927e79e8f2af5c54.zip
Applied AStyle code formating as discussed on tid:74602.
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/netbuffer.h')
-rw-r--r--src/common/netbuffer.h78
1 files changed, 39 insertions, 39 deletions
diff --git a/src/common/netbuffer.h b/src/common/netbuffer.h
index 844241226..a4feb7287 100644
--- a/src/common/netbuffer.h
+++ b/src/common/netbuffer.h
@@ -6,37 +6,37 @@
#include "../common/cbasetypes.h"
-typedef struct netbuf{
- sysint pool; // The pool ID this buffer belongs to,
- // is set to -1 if its an emergency allocated buffer
-
- struct netbuf *next; // Used by Network system.
-
- volatile int32 refcnt; // Internal Refcount, it gets lowered every call to netbuffer_put,
- // if its getting zero, the buffer will returned back to the pool
- // and can be reused.
-
- int32 dataPos; // Current Offset
- // Used only for Reading (recv job)
- // write cases are using the sessions local datapos member due to
- // shared write buffer support.
-
- int32 dataLen; // read buffer case:
- // The length expected to read to.
- // when this->dataPos == dateLen, read job has been completed.
- // write buffer case:
- // The lngth of data in te buffer
- // when s->dataPos == dataLen, write job has been completed
- //
- // Note:
- // leftBytes = (dateLen - dataPos)
- //
- // Due to shared buffer support
- // dataPos gets not used in write case (each connection has its local offset)
- //
-
- // The Bufferspace itself.
- char buf[32];
+typedef struct netbuf {
+ sysint pool; // The pool ID this buffer belongs to,
+ // is set to -1 if its an emergency allocated buffer
+
+ struct netbuf *next; // Used by Network system.
+
+ volatile int32 refcnt; // Internal Refcount, it gets lowered every call to netbuffer_put,
+ // if its getting zero, the buffer will returned back to the pool
+ // and can be reused.
+
+ int32 dataPos; // Current Offset
+ // Used only for Reading (recv job)
+ // write cases are using the sessions local datapos member due to
+ // shared write buffer support.
+
+ int32 dataLen; // read buffer case:
+ // The length expected to read to.
+ // when this->dataPos == dateLen, read job has been completed.
+ // write buffer case:
+ // The lngth of data in te buffer
+ // when s->dataPos == dataLen, write job has been completed
+ //
+ // Note:
+ // leftBytes = (dateLen - dataPos)
+ //
+ // Due to shared buffer support
+ // dataPos gets not used in write case (each connection has its local offset)
+ //
+
+ // The Bufferspace itself.
+ char buf[32];
} *netbuf;
@@ -47,29 +47,29 @@ void netbuffer_final();
* Gets a netbuffer that has atleast (sz) byes space.
*
* @note: The netbuffer system guarantees that youll always recevie a buffer.
- * no check for null is required!
+ * no check for null is required!
*
* @param sz - minimum size needed.
*
* @return pointer to netbuf struct
*/
-netbuf netbuffer_get( sysint sz );
+netbuf netbuffer_get(sysint sz);
-/**
+/**
* Returns the given netbuffer (decreases refcount, if its 0 - the buffer will get returned to the pool)
*
- * @param buf - the buffer to return
+ * @param buf - the buffer to return
*/
-void netbuffer_put( netbuf buf );
+void netbuffer_put(netbuf buf);
-/**
- * Increases the Refcount on the given buffer
+/**
+ * Increases the Refcount on the given buffer
* (used for areasends .. etc)
*
*/
-void netbuffer_incref( netbuf buf );
+void netbuffer_incref(netbuf buf);
// Some Useful macros