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

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: additional files Created 10 years 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
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 #include <sys/wait.h>
7 #include <unistd.h>
8
9 #include "web2socket_serv.h"
10
11 void RunWeb2SocketServer(const std::string& origin, int port) {
12 for (int step = 0;; step += (step < 10)) {
13 int p = fork();
14 if (p == 0) {
15 if (Web2SocketServ::IgnoreSigPipe()) {
16 Web2SocketServ ws(origin, port);
17 ws.Run();
18 }
19 exit(1);
20 }
21 if (p > 0) {
22 waitpid(p, NULL, 0);
23 }
24 sleep(1 << step);
25 }
26 }
27
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698