Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: net/web2socket_proxy/web2socket.cc

Issue 5484001: Web2socket proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for signed/unsigned confusion + cosmetic Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/web2socket_proxy/web2socket.h ('k') | net/web2socket_proxy/web2socket_conn.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <stdlib.h>
6
7 #include <sys/wait.h>
8 #include <unistd.h>
9
10 #include "web2socket_serv.h"
11
12 struct sockaddr;
13
14 void RunWeb2SocketServer(const std::string& origin,
15 struct sockaddr* addr,
16 int addr_len) {
17 for (int step = 0;; step += (step < 10)) {
18 int p = fork();
19 if (p == 0) {
20 if (Web2SocketServ::IgnoreSigPipe()) {
21 Web2SocketServ ws(origin, addr, addr_len);
22 ws.Run();
23 }
24 exit(1);
25 }
26 if (p > 0)
27 waitpid(p, NULL, 0);
28 sleep(1 << step);
29 }
30 }
31
OLDNEW
« no previous file with comments | « net/web2socket_proxy/web2socket.h ('k') | net/web2socket_proxy/web2socket_conn.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698