Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Commit

Permalink
example + README + LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaber committed Apr 21, 2013
1 parent 2847cf3 commit a48495f
Show file tree
Hide file tree
Showing 20 changed files with 5,590 additions and 2 deletions.
19 changes: 19 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
**Copyright (c) 2013, Josh Abernathy**
**All rights reserved.**

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# RockemSockem

RockemSockem, besides being an awesome name, is a super-simple, ReactiveCocoa-
based WebSocket server for OS X.

It uses [CocoaHTTPServer](https://github.com/robbiehanson/CocoaHTTPServer) to do all the hard stuff. Because the hard stuff is hard. Basically all the credit goes to them.

# How do I use it?

1. Add RockemSocket.xcodeproj to your project or workspace.
1. Add RockemSockem to your Target Dependencies.
1. Add RockemSockem.framework to your Link Binary with Libraries.
1. Add RockemSockem.framework to a Copy Files phase which copies it into Frameworks.
1. Weep that this list of instructions is so damn long.
1. Follow all those same steps, but for ReactiveCocoa (in External).

# What about iOS?

If you're running a WebSocker server on iOS I feel bad for you son. I got 99
problems and RockemSockem not running on iOS ain't one. (Pull requests welcome.)
6 changes: 4 additions & 2 deletions RockemSockem.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
885BB96517237B940077DC8F /* HTTPMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 885BB93F17237B940077DC8F /* HTTPMessage.h */; };
885BB96617237B940077DC8F /* HTTPMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 885BB94017237B940077DC8F /* HTTPMessage.m */; };
885BB96717237B940077DC8F /* HTTPResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 885BB94117237B940077DC8F /* HTTPResponse.h */; };
885BB96817237B940077DC8F /* HTTPServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 885BB94217237B940077DC8F /* HTTPServer.h */; };
885BB96817237B940077DC8F /* HTTPServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 885BB94217237B940077DC8F /* HTTPServer.h */; settings = {ATTRIBUTES = (Public, ); }; };
885BB96917237B940077DC8F /* HTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 885BB94317237B940077DC8F /* HTTPServer.m */; };
885BB96A17237B940077DC8F /* MultipartFormDataParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 885BB94517237B940077DC8F /* MultipartFormDataParser.h */; };
885BB96B17237B940077DC8F /* MultipartFormDataParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 885BB94617237B940077DC8F /* MultipartFormDataParser.m */; };
Expand Down Expand Up @@ -377,6 +377,7 @@
885BB99517237E000077DC8F /* RockemSockem.h in Headers */,
885BB92617237A8B0077DC8F /* RSMServer.h in Headers */,
885BB92B17237A8B0077DC8F /* RSMWebSocket.h in Headers */,
885BB96817237B940077DC8F /* HTTPServer.h in Headers */,
885BB97C17237B940077DC8F /* WebSocket.h in Headers */,
885BB92817237A8B0077DC8F /* RSMServer+Private.h in Headers */,
885BB92917237A8B0077DC8F /* RSMSocketConnection.h in Headers */,
Expand All @@ -390,7 +391,6 @@
885BB96417237B940077DC8F /* HTTPLogging.h in Headers */,
885BB96517237B940077DC8F /* HTTPMessage.h in Headers */,
885BB96717237B940077DC8F /* HTTPResponse.h in Headers */,
885BB96817237B940077DC8F /* HTTPServer.h in Headers */,
885BB96A17237B940077DC8F /* MultipartFormDataParser.h in Headers */,
885BB96C17237B940077DC8F /* MultipartMessageHeader.h in Headers */,
885BB96E17237B940077DC8F /* MultipartMessageHeaderField.h in Headers */,
Expand Down Expand Up @@ -756,6 +756,7 @@
885BB91A17237A710077DC8F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
885BB91B17237A710077DC8F /* Build configuration list for PBXNativeTarget "RockemSockemTests" */ = {
isa = XCConfigurationList;
Expand All @@ -764,6 +765,7 @@
885BB91D17237A710077DC8F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
7 changes: 7 additions & 0 deletions RockemSockem/RSMWebSocket.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "RSMWebSocket.h"
#import "GCDAsyncSocket.h"

@interface RSMWebSocket () {
RACSubject *_messages;
Expand Down Expand Up @@ -38,6 +39,12 @@ - (id)initWithRequest:(HTTPMessage *)message socket:(GCDAsyncSocket *)socket ope
return self;
}

#pragma mark NSObject

- (NSString *)description {
return [NSString stringWithFormat:@"<%@: %p> host: %@", self.class, self, asyncSocket.connectedHost];
}

#pragma mark WebSocket

- (void)didOpen {
Expand Down
Loading

0 comments on commit a48495f

Please sign in to comment.