Commit Graph

50 Commits

Author SHA1 Message Date
Olivier Ligot
b4ec6fdff8 Socket: reuse address to resolve the error "address already in use"
On Unix, when we stop the server, and then re-start it right away, we get an
error that the address is already in use:
http://www.softlab.ntua.gr/facilities/documentation/unix/unix-socket-faq/unix-socket-faq-4.html#ss4.1
This means that the sockets that were used by the first incarnation of the
server are still active.

One way to resolve this is to set the socket option SO_REUSEADDR:
http://www.softlab.ntua.gr/facilities/documentation/unix/unix-socket-faq/unix-socket-faq-4.html#ss4.5

Tested on Ubuntu 12.04 LTS
2013-05-29 11:14:58 +02:00
Jocelyn Fiat
ef9494e7e8 removed unused local 2012-12-20 15:43:01 +01:00
Jocelyn Fiat
00d6caba93 Added support for server name 2012-12-20 15:35:48 +01:00
Jocelyn Fiat
e85213689e TCP_STREAM_SOCKET: added try_ready_for_reading' which is the same as ready_for_reading' but without any timeout 2012-03-13 17:38:33 +01:00
jvelilla
ab38345c25 Update readme.txt 2012-02-24 08:54:27 -02:00
Jocelyn Fiat
8b4f774bab Handling bad incoming request (keep a check assertion to help during debugging period) 2011-12-12 10:44:50 +01:00
Jocelyn Fiat
59505ccdc4 various renaming and preparation to merge Thread and SCOOP implementation of Eiffel Web Nino 2011-12-01 17:58:01 +01:00
Jocelyn Fiat
800815c8dd Added put_readable_string_8 to avoid call to .as_string_8 2011-12-01 17:48:15 +01:00
jvelilla
faafa894c2 Merge pull request #9 from jocelyn/master
Removed main thread and removed shared configuration class
2011-12-01 01:23:35 -08:00
Jocelyn Fiat
89cd5a3b44 Removed initial Thread for the HTTP_HANDLER, this is not needed here
Removed HTTP_SERVER_SHARED_CONFIGURATION from the library ... not needed by the library.
Added HTTP_SERVER_SHARED_CONFIGURATION  to the example to show how to share the configuration, if needed
2011-11-30 19:05:16 +01:00
Jocelyn Fiat
713978d70f Using `is_verbose' instead of debug clause "nino" 2011-11-14 16:32:28 +01:00
Jocelyn Fiat
b78c44f4a1 Applied the removal of HTTP_INPUT_STREAM and HTTP_OUTPUT_STREAM to the example. 2011-11-14 16:32:09 +01:00
jvelilla
9f2abab670 Merge pull request #8 from jocelyn/master
Removed HTTP_(INPUT,OUTPUT)_STREAM classes
2011-11-11 03:57:24 -08:00
Jocelyn Fiat
a46c08de11 Removed HTTP_(INPUT,OUTPUT)_STREAM, since it is unlikely that we use something else than TCP_STREAM_SOCKET
This way, we remove one indirection for users, and get smaller code.
2011-11-10 22:05:34 +01:00
Jocelyn Fiat
abd67c8caa applied recent changes related to HTTP_HANDLER.make 2011-11-04 20:27:30 +01:00
Jocelyn Fiat
53496e010b removed useless "a_name" argument
Fixed typo in on_launched
2011-11-04 19:09:49 +01:00
jvelilla
cef6f30251 Merge pull request #6 from jocelyn/master
new event on_launched and on_stopped to ease integration with launching application
2011-11-04 03:51:27 -07:00
Jocelyn Fiat
00ffa50054 added events on_launched and on_stopped to ease integration with launching application 2011-11-04 11:46:56 +01:00
jvelilla
cac126f2f1 Merge pull request #5 from jocelyn/master
Please pull this change
2011-11-03 10:27:27 -07:00
Jocelyn Fiat
c53d4d37a7 added access to the effective port that the server is listening to (useful when we set port to 0 it use a random free port)
added verbose , so that we write message to the console only if desired.
2011-11-03 18:13:55 +01:00
Jocelyn Fiat
7fd4cdbe44 Code cleaning, and nicer output under debug clause 2011-10-21 13:40:56 +02:00
Jocelyn Fiat
e66c666e64 removed unwanted first line 2011-10-12 22:56:01 +03:00
Jocelyn Fiat
4cd1b67607 Cosmetic 2011-10-07 14:40:04 +02:00
Jocelyn Fiat
34bb793599 Added license.lic and copyright to Javier 2011-10-07 14:36:20 +02:00
Jocelyn Fiat
58767bb1c1 add precondition saying the request line should not be empty 2011-09-21 15:26:23 +02:00
jvelilla
9fef2d71f0 Fixed ecf files that cause a cat-call in the example
web server.
EiffelWebNinoWithStreams
2011-09-05 09:18:39 -03:00
Javier Velilla
9dd1439a2f Refactor to use the new library structure convention. 2011-07-15 08:15:31 -03:00
jvelilla
4a87d5822b Merge pull request #2 from jocelyn/master
Please consider pulling from my repository
2011-07-12 03:36:36 -07:00
Jocelyn Fiat
de77802546 Merge branch 'master' of github.com:jocelyn/EiffelWebNino 2011-07-12 11:09:59 +02:00
Jocelyn Fiat
f7cf91500c let's have a nino-safe.ecf and also a nino.ecf for non void-safe system 2011-07-12 11:07:09 +02:00
Javier Velilla
32ff399442 Merge branch 'jocelyn' 2011-06-23 22:59:41 -03:00
Jocelyn Fiat
c7440a2ca0 Fixed the HTTP_SERVER.shutdown_server 2011-06-01 19:13:09 +02:00
Jocelyn Fiat
63cd0610ec Fixed remote info computing 2011-05-31 14:29:16 +02:00
Javier Velilla
c772fc5194 Commit merge jocelyn changes 2011-05-30 23:16:58 -03:00
Jocelyn Fiat
0fda0dc34c left adjust request_header_map items. 2011-05-30 22:26:35 +02:00
Jocelyn Fiat
f22f42c463 Fixed nino.ecf by removing the root class since this is a library config file. 2011-05-30 11:31:53 +02:00
Javier Velilla
569a587ffd Update Readme files 2011-05-28 20:15:48 -03:00
Javier Velilla
6317ca2fe5 Merge git@github.com:jvelilla/EiffelWebNino
Conflicts:
	README
2011-05-28 19:53:47 -03:00
Javier Velilla
12d9dcfff5 Commit Jocelyn changes. 2011-05-28 19:40:31 -03:00
Jocelyn Fiat
824750e748 Don't forget to reset request data 2011-05-27 22:05:56 +02:00
Jocelyn Fiat
c544da3561 Reset values after processing the request
Added port information when starting the server
2011-05-27 19:44:50 +02:00
Jocelyn Fiat
e5e9f9486e Added force_single_threaded option
Modified the interface of process request
default port is now 80
2011-05-27 19:08:35 +02:00
Jocelyn Fiat
720351871b fixed typo in assertion 2011-05-27 16:03:50 +02:00
Jocelyn Fiat
54b95650c5 Moving things around to make it more structured. and turn into library 2011-05-27 15:21:30 +02:00
Jocelyn Fiat
c553bd1e1e abstracted the HTTP_HANDLER
to let the user integrate at the level of its choice
(either very early so handle itself the header handling, or later to reuse existing code)
2011-05-27 13:07:06 +02:00
Jocelyn Fiat
64cf2b6936 A few change to make it more customizable
and prepare integration to EiffelWebReloaded (see on github)
2011-05-26 17:23:21 +02:00
jvelilla
85cf39f3c6 Edited README via GitHub 2011-05-21 09:11:32 -07:00
Javier Velilla
af852498be Added process directory 2011-05-21 12:46:45 -03:00
Javier Velilla
dfa30471e3 Import HTTPD Eiffel 2011-05-20 08:58:26 -03:00
Javier Velilla
094dc09354 first commit 2011-05-20 08:53:04 -03:00