Jump to content


Photo

TcpLink Communication with Server


  • Please log in to reply
7 replies to this topic

#1 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 11 March 2008 - 11:44 PM

Hi all, create a new topic for this release.
Name:Server Writer
Version:v0.1
Compatibility: v1.2 at least (need TCPLink class)
Description:allow uscript developer to write, append or read from a remote file
Comments:The purpose of this dev is to help modders for persistant storage. Java has been chosen for its interoperability (the server can run on both window and unix platform)
Screenshot:
Credits: Erwan "Xiongmao" Allain
Homepage:
Download: TCPLink.zip


I'm happy to show you my new creation. As it's written in the title, I extend the TCPLink to communicate with a remote Java Server.
For now, it can receive 3 type of requests:
- WRITE_TO_FILE
- APPEND_TO_FILE
- READ_FROM_FILE

Basically, you need to specify the port on which the JavaServer will listen to requests. You also define the ip and port on which the UScript client will create the socket (bridge between client and server) and that's all configuration is setup.
The Unit tests have been passed, although some points stay opened such as communication with proxy.
The next step would be communication with database. As the network part works, it's only new type of request to add and String parsing to handle SQL request.

In the archive, you can find two parts:
- the UScript side which contains a mutator using the new feature
- the JavaSide with the binaries and sources of the server
Don't forget to read the ReadMe.txt first !!!

I appreciate if some people has the courage to test it :p

Edit: Epics Games header like added

Edited by xiongmao, 12 March 2008 - 08:30 AM.


#2 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 12 March 2008 - 09:17 AM

I'll be sure to give it a whiz - something like that is always very useful.

Feel free to add it to Subversion, so that in the depths of time it's not so easily lost to the forum.

#3 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 12 March 2008 - 09:51 AM

sure I'll do this tonight

[Edit] uploaded in repository\Misc :p

Edited by xiongmao, 12 March 2008 - 07:02 PM.


#4 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 19 March 2008 - 11:25 PM

double post

3#12#[0;1]killer 1;[0;2]0;[0;3]killed 1;[0;4]1;[0;5]0
[1;1]killer 2;[1;2]0;[1;3]killed 2;[1;4]1;[1;5]0
[2;1]killer 3;[2;2]0;[2;3]killed 3;[2;4]1;[2;5]0
[3;1]killer 4;[3;2]0;[3;3]killed 4;[3;4]1;[3;5]0
[X;Y] means Record X Col X
This is the message on UScript side in log file from a SQL query sent also from UScript to my server

the query was: SELECT EA_DBStatsLink.KILLER, EA_DBStatsLink.KILLER_TEAM, EA_DBStatsLink.KILLED, EA_DBStatsLink.KILLED_TEAM, EA_DBStatsLink.TEST FROM EA_DBStatsLink
todo:
- add Where condition
- insert query
- update query
- delete query

I'm on the right way :crazed:

[Edit] In the same time, I made researches on IRC communication and found an easy java API which handle this perfectly, another way to explore :crazed:

Edited by xiongmao, 19 March 2008 - 11:54 PM.


#5 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 20 March 2008 - 09:51 AM

That's pretty cool.

Have you thought about trying to get two way information? Sending data back in to Unreal could be cool too.

#6 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 20 March 2008 - 09:56 AM

my mistake if my explanation was wrong.
the test was:
Unreal (sendQuery) => JavaServer(receiveQuery) => JavaServer (deal with database) => JavaServer (sendResult) => Unreal (receiveResult)

loop is looped like we say in French :crazed:

#7 xiongmao

xiongmao
  • Members
  • 175 posts
  • Location:Paris

Posted 29 March 2008 - 10:14 PM

Hi all,
here is a major update of my ServerWriter The Link
- connection with database, query type allowed:
- INSERT
- UPDATE
- SELECT
- connection to an irc chan using a java bot.

2 mutators have been added to show how to use the new features.
- The mutator with the database maintains a simple table with 2 columns: the player name and a counter of kill. It increases the counter of the killer at each kill (could be used for theme upgrade though :p)
- the mutator with irc send the same string as the mutator which write in the file " Time 'killer' has killed 'killed' to the server and chan configure in the mutator

Posted Image


enjoy :)

Edited by xiongmao, 29 March 2008 - 10:26 PM.


#8 ambershee

ambershee

    Nimbusfish Rawks

  • Hosted
  • 3,114 posts
  • Location:Derby, UK
  • Projects:Mutator Week & Unreal 3 Projects
  •  Mad Mod Boffin

Posted 31 March 2008 - 07:47 AM

That's great work!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users