66 mensajes Página 3 de 4
I built them demos you had and I get 2 errors and I get 362 warnings, also I just want a single DLL like your first post here for AMS, that works for send and connect, disconnect and kick but I have no idea how to find out any other functions you included in that DLL even with a DLL viewer or what arguments you included with it.
Contenido Oculto: ON
	<br />Usted necesita responder en este tema para ver el contenido oculto.


Full Build Log
http://pastebin.com/QyeyFj6u
USAz english soz allz

Patch 1.0.0.3 Aero
gracias
Just to let people know, that first DLL he posted WILL, CAN and has provided at lest a 3 connections at the same time chat on windows
so you can make a chat IM app in windows with the first DLL, with the basic connect and disconnect options provided.

I still want to know more and how to use passthrow and other things like hes done in the other github demo to pass html pages to the user and things like that.

But the first demo and DLL can be adapted really well for AMS and it seems it already have some kind of thread built in, I have found this makes multithread and other plugs crash the app when you use over ride function in global's

I say only thing missing is the documatons on how to use it but the Connect and Dicconect for a basic chat or server based app will be needed anyway, I would like to know how to use others but when I try and use the RakNet unctions like GetPeerInfo I get told it's not a function so or well.

If you could update the demo with passthrow and maybe how to server html pages that would be epic, also do you know of any android clietns to test it ?

Even tho I spend time wasted downloading VS and stuff like that the origrnal DLL is still epic.
USAz english soz allz

Patch 1.0.0.3 Aero
lol a lot of posts. sry ive been busy.

patch escribió: Another question about your DLL you posted here did it have support for NATPunchThroughServer and NATPunchThroughClient and if so how the hell would I use it :) :penguin:


no. the dll plugin posted here and the repo one dont have nat hole punching interfaces. but is quite easy to implement. raknet samples are a little bit confusing because it includes several kinds of nat punching (local lan peers, modern routers, older ones etc...) but its understandable.

patch escribió: I fixed the lua command problem tho I don't know how to make it do a set of commands rather then just one, also what the hell is return 22 I get it from time to time the server will get USERNAME -> (BLANK MESSAGE) and the user will get (22) but the connection seems to have been lost.


Packet id 22 in raknet stands for ID_CONNECTION_LOST take a look at https://github.com/pabloko/Lua-JIT-RakN ... ntifiers.h

patch escribió: I would really like to know what functions you included in this dll or aw ay to to view them I used a normal dll viewer but it only says the LUA function.

I want to know so I know witch ones I have like blocking, pinging, getting ip if you only have the connect and send functions that that's fine I can create my own for the other part from the IP one.

But the size of the old DLL would indecate there is more in there, I also like to try holepunching passthrow or what ever its called but since there is no documents for this dll its not really helpful, do you still have a copy of it.

Part from that the DLL even in the demo state you shown is very usesful this can be used for so many things to chat apps to fully intereated remote software, the chat idea I messing with but my goal is a mini server to run custom commands at for a bunch of other servers.

I know your new one as http also, I unable to still complie at the moment so can I ask you to complie it as I like to try the web page service also, dude this is a epic dll just more about it would be SO helpful you really don't know what this could mean for AMS some of the basic remote app ideas we had in the past what luasockets or Sockets plugin couldn't do, this is fast seems to handle threads a much better then the other two.

I not sure if that DLL you have here is threaded or not but I not had problems yet with multi chats/commands at once.


the dll posted here is multithread as i think i spawned a thread to do a recieving loop. repo version is selectable but most cases should use mutithread. in fact in a little view on ida

Imagen

So as u see its just a thread spawn and registering lua RakNet methods. In the reciving part this seems to be a second version of the plugin. seems to send every packet to a global function u must define named kbhit (to be serial like)

Imagen

patch escribió: I built them demos you had and I get 2 errors and I get 362 warnings, also I just want a single DLL like your first post here for AMS, that works for send and connect, disconnect and kick but I have no idea how to find out any other functions you included in that DLL even with a DLL viewer or what arguments you included with it.
Error 183 error LNK1181: cannot open input file '../libs/lua51.lib' Q:\Users\Tux\Downloads\Lua-JIT-RakNet-master\RakNetLua-Server\LINK RakNetLua-Server
Error 364 error LNK1181: cannot open input file '../libs/lua51.lib' Q:\Users\Tux\Downloads\Lua-JIT-RakNet-master\RakNetLua-Client\LINK RakNetLua-Client

LINK : fatal error LNK1181: cannot open input file '../libs/lua51.lib'


Full Build Log
http://pastebin.com/QyeyFj6u


that seems u have missing luajit library files as github removes libs. i will compile it again and post bins soon dont have much time now. if you want to compile your own luajit download srcs from main site then use vs2013 command prompt to run the msvrcbuild.bat in the source folder. remember to replace on that file /MD by /MT for better compatibility. it will generate .dll/.lib/.exe lua51 files and project will compile

patch escribió: Just to let people know, that first DLL he posted WILL, CAN and has provided at lest a 3 connections at the same time chat on windows
so you can make a chat IM app in windows with the first DLL, with the basic connect and disconnect options provided.

I still want to know more and how to use passthrow and other things like hes done in the other github demo to pass html pages to the user and things like that.

But the first demo and DLL can be adapted really well for AMS and it seems it already have some kind of thread built in, I have found this makes multithread and other plugs crash the app when you use over ride function in global's

I say only thing missing is the documatons on how to use it but the Connect and Dicconect for a basic chat or server based app will be needed anyway, I would like to know how to use others but when I try and use the RakNet unctions like GetPeerInfo I get told it's not a function so or well.

If you could update the demo with passthrow and maybe how to server html pages that would be epic, also do you know of any android clietns to test it ?

Even tho I spend time wasted downloading VS and stuff like that the origrnal DLL is still epic.


ive tested this on 260+ peers without problems. if you need p2p abilities you will have to add those plugins and do proper initialization on both server and client. Also u may need extend the lua api to steam more kinds of data like raknetguids. you know the correct examples so its all implement them.

Cool thing of newer src version is theres the BitStream interface to send and recieve compressed data instead having to serialize data and send a str. also http support and micro server are cool features to program faster.

I still suggest to use newer repo version, as u have full code of it, documentation isnt needed at all.

For android/ios/linux/macos/etc etc builds you should take a look at raknet repo, they have docs of doing it and raknet version ive used is 3 that supports wide range of systems. but websocket is faster for that cases i think.
ImagenImagenImagenImagen
compiled new version:
Contenido Oculto: ON
	<br />Usted necesita responder en este tema para ver el contenido oculto.
ImagenImagenImagenImagen
Thanks bud, Ya the older DLL you have to handle everything like you said but to say you only have access to the very basic it is very powerful I was trying to look at the new source code to make it as I would also like to accept HTML traffic on that port number what would enable the user to download the client software from the Server it's self that would be a nice little option :)

I been able make a very chat like demo with this I have had to make a few changes as some of the plugins been accessed in the kbhit will crash AMS so some functions what I need to update with kbhit have been moved to a timer check what works well I have to say.

:penguin:

I can't believe RakNet as been around this long and was never intergreted in to AMS its bloody good, At the moment the Server owner has to open the ports but after this has been one its very useful and thanks I added a reconnect option to my client if it got 22 and it sems to work,

That link you send I can't tell witch error is witch ID but I been able to get some basics out of the example and just probing the returns so far, I know 17 is connection lost or connection timed out 21 is connection closed, 19 is something like connection made, I am still trying to understand the returns :)

I want to make this more useful and for me I can but I want to make it useful for otheres, and since kbhit seems to not handle error's every well it would rather just brake there is a lot of debuging and checking before it gets to action in AMS what could return a error,
what is fine here but for a n00b not so good lol

Thank you for letting us see this DLL it's very useful like I said, I could try make a basic game with this but I don't think AMS needs it, the tools its good to be like database ran apps and things are good for this also the chat app and minecraft server what I slowly working on.

The passthrow is over my head right now but it works without it with a little but of explaining, if you don't know how to use your PC or rougher then maybe you shouldn't be running your own chat app server lol

Well a :cookie-1417754631: to you sir, I don't think I have had AMS open as long as I have at late thank's to your DLL and bringing it to light.
USAz english soz allz

Patch 1.0.0.3 Aero
That Last you you sent will only work with the server exe with it right? I am not able to use that one in AMS am I? I know you would be thinking why would you need to but you know me I like making things work in AMS natively :)


The options I like the look of is the onHTTP and the BitStream functions :)

:friends:
USAz english soz allz

Patch 1.0.0.3 Aero
Hey, nice u doing progress on that.

On Packet identifiers clarification, note that in c++ enums acts as an incremental definition, take a look at enum DefaultMessageIDTypes, first one will be id 0, next one 1, next 2... take a look...

Imagen

theres (i think) 162 reserved ids of possible 512. you can use anyone in range of 162-512 with any data u want.

BitStream implementation helps turning lua vars into native types and vice versa. for example, you want to send the number "22" if you send it as string it will take 8 bytes in the packet. but if you choose TUINT8 type it will use only 1 byte.

Using those types depends on your architecture but use always the less you can, sync will be faster. note that types are like c++ ms ones.

TBOOL - 1/0(TRUE/FALSE) (1Byte)
TUINT8 - 0 TO +512 (1byte)
TINT8 -256 TO +256 (1 byte)
TUINT16 - -32,768 - +32,767 (2 bytes)
TINT16 - 0 - +65,534 (2 bytes)
TUINT32 −2,147,483,648 to 2,147,483,647 (4 bytes)
TINT32 - 0 to 4,294,967,295 (4bytes)
TFLOAT - any decimal number (4 bytes)
TSTRING - any string (max 512 chars - each char is a byte + 1 for string lenght)


design your packet structure using less bytes possible.

Btw, all those plugins are lua modules and not ams plugins, so they can run in any lua app, not only on ams (but on ams too). also can be used on luajit or standard vm.

The http interface just rely on a function "string OnHTTP (headers, ip)" it will recieve http headers as string and the ip. you just return a string that is the content. theres no binary support on output so sending images and files will be hard but httpinterface is very weak part of raknet and i encourage of use 3rd party place to store images and assets and use this just to generate html static content. As its running on same enviroment, you can show on the static content info about current server data and users connected to it.

Ive used the client to connect to SA-MP servers (gta:sa) with minimal changes, and spawn fake bots on the game. Its perfectly good for gaming engines and realtime communications. RakNet has lots of plugins like RakVoice to stream audio/video and Nat hole punching to do p2p networking so everithing is fork the code and add those plugins and implementations on lua api.
ImagenImagenImagenImagen
Yes its a really good tool, I know the first DLL is v2 and that is what I am still working with, I tried added your new DLL to AMS but it says that the OpenServer function was no longer there, so I guess its called or used a little different.

The demo I have working I was going to code a "please wait option" for sending files from client to server and server to client that will send a fixed sized file from one to another like a meg max so they can share custom emojis and shut like that.

But part from that even the V2 DLL is really :accepted: :awthanks-1414025485:

Once again thanks for this, Grabbing the data and ripping it apart is easy I can have commands and requests send as a simple
at the moment I send another PID if I want to do more complex things what I don't want the client to ever debug and if I am doing something basic I use a simple string like 0::2::USERNAME::DATA this really is a table and I use the :: as braking points we I use :: || things like this what wont be used by the send-e

At the moment its in plaintext rather then 0::2::USERNAME its REQ::UID::Username

but I can simple that dawn a lot soon as I have my ideas tested, at the moment I am using a my version 2 demo on my version 3 server example lol as just so I have a client to send things to the new servers and no matter how the data comes back the server and clients can wrap the data how they want

I was going to add encytions bit I not sure how I am going to do this yet, I might do a basic handshack system where the users can start to build trust, since its a private IM system anyway you will be giving people your IP address you know but you can then build trust before sharing a handshare key what will also then build a session key based on that handshake I not sure how to do this in AMS yet but I sure I can do it.

I think I might just add a simple commandline HTTP server for now if I do what I want to do with it what will server a file created by AMS this means it can sit there with the AMS app closed and then when the two sides are there the server can open the server so the client can connect or something like that :)

I would love to be able to do sound but rignt now I trying to do the basics, next is a little base64 for the images sending, the server and client both have sting replacements and is able to trigger sounds on the client and server as there included with the app rather then sending them via the RakNet and if I do bundle it with a HTTP server the server can have them download extra files one time.

Once again thanks I going to try get something stable this week and when I do I will make the server and client based on the V2 DLL here and post it back, I will post a new thread but I hope it will be some fun for people to use, :drunk:
USAz english soz allz

Patch 1.0.0.3 Aero
i highly discourage sending long chunks of data over UDP's raknet packets. i also remark in this case less is better. dont send strings, use bitstreams with a fixed architecture, for example 2 TUINTS and a TSTRING for the nickname.

the raknet tcp interface used for http is not thread safe. it will block until data is sent and another connections will await intil it process them, if youre planning to send large files i highly recommend to edit networkupdate and spawn threads for repliying tcp packets. also you can even use a fallback filesystem reply to send binary files like images or assets.

adding encryption on lua side is useless. maybe adding it to the raknet layer, like some game servers are doing.

remember to use less data possible, base64 for example will multiply by 4 the size of data u sending so try to avoid it, by design tcp interface is done in the same thread as udp so it may also affect the udp layer.

if you really need to send big chunks of data you can mix udp and tcp interfaces for example.

upload
udp sends PACKET_DATA_UPLOAD_REQUEST
udp reply  PACKET_DATA_UPLOAD_REQUEST with id 99999999 (assigned to x id)
tcp send http data http://server:1234/upload/99999999 with POST data...
tcp server got the data from id 99999999 (assigned to x id) in the http headers
udp reply PACKET_DATA_UPLOAD 1=OK


download
udp reply PACKET_DOWNLOAD with data (filename)"assets.zip" (hash)"9x9x9x9x9"
http.get http://server:1234/download/9x9x9x9x9x and save to assets.zip
tcp reply from hash 9x9x9x9x, serve assets.zip
udp send PACKET_DOWNLOAD 1=OK


this way you can mix both interfaces and have decent bidirectional data transfer for big files, BUT REMEMBER ONLY POSSIBLE IF YOU MAKE TCP INTERFACE THREAD SAFE, actual code will hang.
ImagenImagenImagenImagen
That is also possible or even host a small http server what is not part of rakNet what this side just puts the file and the client then HTTP downloads it I am still using the old DLL like I said so I just using the info you provided in that and the data line takes the message as string.

I will be able to use the PID as the request accept and send options but so the client knows where to download from I still need to
use the data string, I might also see about using other image host's API's to upload the image to them and then embed that in to the client/server's html ui

I will PM you my listenr function so you know what my server side is doing right now, the client at the momnet just prints out the data in to a listbox nothing magical there.
USAz english soz allz

Patch 1.0.0.3 Aero
Is there a reason why this wouldn't work on windows 2000? I get
Imagen

Do I have to call the dll another way in windows 2000?
USAz english soz allz

Patch 1.0.0.3 Aero
I get this when I change the call a little
Folder.SetCurrent(_SourceFolder.."\\AutoPlay\\Scripts");
package.cpath = _SourceFolder.."\\AutoPlay\\Scripts\\?.dll;"
require("RakNetLua");
 
Parsed in 0.002 seconds, using GeSHi 1.0.8.9

Imagen
USAz english soz allz

Patch 1.0.0.3 Aero
maybe u got missing msvc reditributable package installed, maybe ive compiled it with shared dependencies, so try installing them.

if error persist try to trace the error on the windows event viewer to see whats failing.
ImagenImagenImagenImagen
It works on windows XP fine so I will debug windows 2000 when I have time, since windows xp only supports IE 8 and I need IE 11 for my UI I have to remake it anyway.

You you able to make the new DLL like you did with the first one so it will work in AMS when you have some spare time? if not its OK I good with what I have but I read that RakNet was little more stable and has a few functions could be needed like returning the clients info also it supports p2p without server open from what I read so I could use this to use the server as user basiced tool to get the users online and then a send it to another app two p2p each other maybe I don't know lol

I loving playing with this tho I can see it been used for so much from app 2 app talking all the way to IM's and maybe games not tired to hammer it with that kind of hammering I don't think AMS would be the best for it.

But its given me reason to open AMS again so thanks
:dealwithit-1414024955:

RakNet Plugin would be epic I have a few ideas but its your DLL so I thought I ask first could I make a plugin with this, it will just be a complex wrap really but its needed since RakNet does not tell you errors it just crashs so alot of checking is needed first well the old DLL does and I happy to do that when I got my basic ideas working

Also do you know of a dll what works in AMS for AES256?
USAz english soz allz

Patch 1.0.0.3 Aero
OK looking at the DLL and seeing what's open it says there is a OpenClient but no OpenServer there is a Create, but I can't see the old
multi thead listener anymore ever, does that mean I am stuck to using the update function and call it in a timer?
USAz english soz allz

Patch 1.0.0.3 Aero
Follow up: viewtopic.php?f=15&t=3589&p=46072#p46072

ive publised a documentation and new version with simple demos with it. since i dont have ams installed they run in the lua5.1.exe test executable.

pushed it to another thread because we derrailed this one. keep the conversation here.

Also published a client plugin for websockets viewtopic.php?f=20&t=3580

Regards
ImagenImagenImagenImagen
graças
Thanks for this
Pabloko escribió: Hoy dejo por aqui un modulo para lua que habia hecho para unos trabajos y que ahora he retomado y estoy mejorando. De hecho la version que publico hoy esta "anticuada" tengo que acabar un nuevo release con una funcionalidad extra. Aun asi funciona a la perfeccion.

Para los que no conozcais RakNet, es una libreria open source de networking cliente/servidor que utilizan un buen numero de juegos modernos.

Es un modulo para lua 5.1.4 por lo tanto no necesita ams, aunque se puede utilizar sin problemas en autoplay.

Como seguramente este modulo entre en lua for windows he realizado una documentacion asi no es necesario que tenga que escribir mas

Imagen

DOCUMENTACION

This message is hidden
66 mensajes Página 3 de 4

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado

cron