Re: TCP socket wothout HTTP protocol

2020-06-05 Thread Sébastien Mizrahi
Thanks Yann that was exactly what I was looking for ! Now works great ! Le 4 juin 2020 à 12:50 +0200, Yann Ylavic , a écrit : On Thu, Jun 4, 2020 at 12:26 PM Sébastien Mizrahi wrote: In apache, the ap_hook_process_connection is not called until content is sent on socket, ap_hook_pre_connection a

Re: TCP socket wothout HTTP protocol

2020-06-04 Thread Yann Ylavic
On Thu, Jun 4, 2020 at 12:26 PM Sébastien Mizrahi wrote: > > In apache, the ap_hook_process_connection is not called until content is sent > on socket, ap_hook_pre_connection and ap_hook_create_connection are called > only after 10 seconds in this case. I would like to have a hook called when >

Re: TCP socket wothout HTTP protocol

2020-06-04 Thread Sébastien Mizrahi
[sorry mail has been sent too quick] Another not desired behavior related : The ap_hook_process_connection is not called until client stops. In the client, got this code : int main(int argc, char const *argv[]) { int sockfd, connfd; struct sockaddr_in servaddr, cli; sockfd = socket(AF_INET, SO

Re: TCP socket wothout HTTP protocol

2020-06-04 Thread Sébastien Mizrahi
Another not desired behavior related : The ap_hook_process_connection is not called until client stops. In the client, the Seb. Le 14 avr. 2020 à 19:46 +0200, Sébastien Mizrahi , a écrit : Hey Eric just a feedback to confirm that it just works as expected. Thanks again ! Client from https://www

Re: TCP socket wothout HTTP protocol

2020-04-14 Thread Sébastien Mizrahi
Hey Eric just a feedback to confirm that it just works as expected. Thanks again ! Client from https://www.geeksforgeeks.org/socket-programming-cc/ Apache module : int socket_process_connection(conn_rec *req) { printf(« Conn init\n"); apr_socket_t *asock = ap_get_conn_socket(req); int fd = 0; apr

Re: TCP socket wothout HTTP protocol

2020-04-14 Thread Sébastien Mizrahi
Thanks a lor Eric ! Gonna read this :) Le 14 avr. 2020 à 17:20 +0200, Eric Covener , a écrit : On Tue, Apr 14, 2020 at 11:16 AM Sébastien Mizrahi wrote: Hi, For some reasons, I would like to read natively TCP socket in an Apache module. The request is not encapsulated in HTTP protocol end the

Re: TCP socket wothout HTTP protocol

2020-04-14 Thread Eric Covener
On Tue, Apr 14, 2020 at 11:16 AM Sébastien Mizrahi wrote: > > Hi, > > For some reasons, I would like to read natively TCP socket in an Apache > module. The request is not encapsulated in HTTP protocol end the client send > raw data. > I have already an apache module that manage standard HTTP req

TCP socket wothout HTTP protocol

2020-04-14 Thread Sébastien Mizrahi
Hi, For some reasons, I would like to read natively TCP socket in an Apache module. The request is not encapsulated in HTTP protocol end the client send raw data. I have already an apache module that manage standard HTTP request and I would like to mutualise the code. Any idea if that’s possibl