30 Commits

Author SHA1 Message Date
skotlex
0c362fa90f - Modified flush_fifo so you can decide whether to block the current thread or not until the data is sent. The server-tick reply no longer blocks the current thread.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9486 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-13 13:45:52 +00:00
FlavioJS
b524f75cd0 - Reversed revision #9415 (messages with server_tick field being sent as soon as possible) since it didn't fix the client synchronization issue.
- clif_parse_TickSend is sent immediately so the client gets accurate "pings"

Note: in Changelog, for my changes, if they're grouped together and in the same day I'm only gonna "sign" the bottom line.
All unsigned lines are assumed to be from the same person of the previous line (below). (easier searches =P)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-09 15:57:22 +00:00
FlavioJS
0931ce5d81 - Messages with server_tick field are sent as soon as possible now.
This might fix client synchronization issues.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9415 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 10:57:31 +00:00
FlavioJS
b522ca0cdc - Replaced @send with the version I use for testing packets.
Can display the packet length. Supports dynamic packets, quoted strings 
  with escaped characters and fixed/variable length, and normal/hex 
  byte/word/long data types. The number of fields is not limited, but it 
  automatically stops parsing when the packet is full.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9387 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02 04:21:35 +00:00
FlavioJS
636089bb3a - Probably fixed the Segmentation Faults we've been having.
Description: A player quits and it's session is freed and set to NULL, 
       but the char server already sent a packet with player information 
       (registers, storage, ...). If a message is sent in consequence of 
       updating that info, a segmentation fault happens because 
       session[sd->fd] is already NULL.
  Fix: make shure the session of the target player is valid before 
       processing the rest of the char server's message.
- Some minor cleanups.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9366 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 20:07:22 +00:00
skotlex
cfee0ccf63 - Added all the missing FIFOHEADs in the login/sql servers (required for TURBO support)
- Fixed the fact that the TURBO code breaks when you attempt to handle more than one connection at a time within the same function. However this broke map-server compilation, therefore, don't use TURBO yet! It needs more fixing (and I need more time to fix it)
- While at it, cleaned a few packet implementations in the char/login servers which were not only ugly, but had some really stupid flaws within (stuff like escaping a string, and then using the non-escaped variable to insert to SQL? T_T) And will someone explain me why the TXT servers are coded much more cleanly, and without such horribly broken code as I find in the SQL ones? T_T;


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9307 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24 12:41:38 +00:00
skotlex
73379857e2 - Made WFIFOHEAD() check for available buffer size remaining on the connection, and when there's not enough space, it will increase it.
- Added define TURBO to the Makefile. It enables MouseJstr's socket access optimization which should speed up the code when accessing the write/read buffers repeatedly within a function.
- Fixed the functions where the RFIFOHEAD/WFIFOHEAD functions were used incorrectly (prevents TURBO enabled compilations from finishing)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9297 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-23 15:33:51 +00:00
skotlex
c616fec871 - Improved a bit RFIFOFLUSH as suggested by Harbin.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-21 19:10:31 +00:00
skotlex
27c9a6fe5a - Modified set_nonblocking and setsocketoptions in socket.c, using eApp's code as reference. Hopefully should improve performance somewhat.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8710 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-11 21:32:26 +00:00
Lance
26500644dd * Optional macro MEMSET_TURBO for faster low-level memory initializations.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27 06:38:17 +00:00
skotlex
4d27716bf1 - Tested and fixed resolve_hostbyname.
- Applied said function around most of the code where needed. Removed includes for the OS/network system pretty much from every file (our socket.c file should handle this)
- Added clif_getip_long, which returns the ip as a long. Prevents having to include the files to define the int_addr structure in all files that include clif.h
- Made the GM mute request bypass the manner_system setting.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7285 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22 01:12:52 +00:00
skotlex
84cdde2a88 - Whoops, somehow socket.h wasn't udpated correctly -.-
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7282 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21 18:35:31 +00:00
skotlex
847d853332 - Added function parse_hostbyname() which takes a hostname and a char[4]. The hostname is resolved to an ip, whose individual components are stored in char[], the return value of the function is the inet_addr result of the lookup (or returns 0 when failed). Meant to be used in the rest of the code without the need to do socket/network related includes.
- Applied use of parse_hostbyname() in chrif.c to fix compilation errors.
- status_percent_change will now account for when the target's max hp/sp is above INT_MAX.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21 18:30:39 +00:00
skotlex
d72c881051 - Removed typedef bool from socket.h and included cbasetypes.c instead.
- Cleaned up and corrected the calculation of hit/flee/cri/lucky dodge in status_calc_bl.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6890 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 14:06:22 +00:00
Valaris
2178a86317 AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EVERYTHING ELSE
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:10:48 +00:00
Valaris
fd99753f8e Clearing trunk.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:00:45 +00:00
amber
83500a3c58 Finished native SQL projects [MouseJstr]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1351 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-31 04:02:06 +00:00
amber
c8d5eb58c4 Fix linux builds
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1340 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-30 01:17:30 +00:00
veider
7a6ae3f0e6 git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1339 54d463be-8e91-2dee-dedb-b68131a5f0ec 2005-03-29 21:51:46 +00:00
celest
61c4e01a71 * Updated jA's dummy socket to mod1137
* Added jA's ddos protection system
* Moved stall_time's reading to packet_athena.conf

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1237 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-16 12:21:26 +00:00
celest
311621f308 * Added jA's dummy socket to prevent fd crashes
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1183 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-02-26 08:38:22 +00:00
(no author)
302cc85025 Servers can bind to single IP addresses now, and added buffer.(c/h)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-02-05 02:07:30 +00:00
(no author)
778e804dd6 update
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-01-23 20:38:44 +00:00
amber
f68c8a4805 update
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@924 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-01-06 15:02:42 +00:00
amber
0452a9c55f cxx updates
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@861 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-29 19:18:18 +00:00
amber
f922478b19 updates
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@793 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-26 19:44:00 +00:00
amber
b2a04b6bdd oops.. missed some
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@448 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-05 03:50:24 +00:00
amber
c4c0532ffa A few bug fixes
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@412 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-11-29 05:19:01 +00:00
amber
d479e29aee Fixed some file types
git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@172 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-11-14 16:18:26 +00:00
(no author)
706e785091 git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@2 54d463be-8e91-2dee-dedb-b68131a5f0ec 2004-11-04 23:25:09 +00:00