Hello,
(Sorry for my bad English, I am a French developer (Hard and Soft) on PIC, Asm, vb6 and others materials and languages...)
I have build a service TCP server application (ServerSocket and AsyncStreams) that run very nice and speedy with multiple clients in the same time.
In HTTP mode It can decode all the Methods (GET,POST, HEAD, PUT, DELETE), it build automatic entete response with "Content-Type","Content-Length",... . I have successfully passed tests with W3C on HTML 4.01 transitional, css and java.
It can act as Http-Server , JBUS/MODBUS-TCP Server, JBUS/MODBUS Server and other binary protocols (used for control/commands in automation Building) , on the same socket (the protocol of the response is automatically switched and passed as argument when the response is asked to the main service).
But i want to block connection for IP Client non authorized.
Question :
- How do the server to retrieve the IP-address of the connected clients when the event sockServeurWeb_NewConnection fire ?
Notes :
- I am working with Basic4Android version 2.52, library NetWork version 1.23 and different target devices with Android 4.0 and sup (Acer, Arnova and Chinese tablets).
- I have try the library B4a "HttpServer" version 1.00 that contain the interesting property "RemoteAddress" in the object "ServletRequest".
But i can not use this library for three reasons :
1 - It can act only in HTTP mode and not in binary (for JBUS/MODBUS and other binary protocols for automation building).
2 - The response is too slow !! (with Opera, Firefox, IE and Chrome).
3 - I can not destroy immediately the socket of the response, in case of the blocked IP.
Elements of responses :
1 - Must i create a new class which include ServerSocket with additional properties and events ? and if yes how to ?
2 - Must i create or adding functions on a new lib based on library NetWork 1.23 ? and if yes : can I modify the source and how to ?
Thank you for yours responses.
(Sorry for my bad English, I am a French developer (Hard and Soft) on PIC, Asm, vb6 and others materials and languages...)
I have build a service TCP server application (ServerSocket and AsyncStreams) that run very nice and speedy with multiple clients in the same time.
In HTTP mode It can decode all the Methods (GET,POST, HEAD, PUT, DELETE), it build automatic entete response with "Content-Type","Content-Length",... . I have successfully passed tests with W3C on HTML 4.01 transitional, css and java.
It can act as Http-Server , JBUS/MODBUS-TCP Server, JBUS/MODBUS Server and other binary protocols (used for control/commands in automation Building) , on the same socket (the protocol of the response is automatically switched and passed as argument when the response is asked to the main service).
But i want to block connection for IP Client non authorized.
Question :
- How do the server to retrieve the IP-address of the connected clients when the event sockServeurWeb_NewConnection fire ?
Notes :
- I am working with Basic4Android version 2.52, library NetWork version 1.23 and different target devices with Android 4.0 and sup (Acer, Arnova and Chinese tablets).
- I have try the library B4a "HttpServer" version 1.00 that contain the interesting property "RemoteAddress" in the object "ServletRequest".
But i can not use this library for three reasons :
1 - It can act only in HTTP mode and not in binary (for JBUS/MODBUS and other binary protocols for automation building).
2 - The response is too slow !! (with Opera, Firefox, IE and Chrome).
3 - I can not destroy immediately the socket of the response, in case of the blocked IP.
Elements of responses :
1 - Must i create a new class which include ServerSocket with additional properties and events ? and if yes how to ?
2 - Must i create or adding functions on a new lib based on library NetWork 1.23 ? and if yes : can I modify the source and how to ?
Thank you for yours responses.