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

Commit

Permalink
Objective-C client speed optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
OlehKulykov committed Feb 19, 2015
1 parent 7c0e523 commit 04fe206
Show file tree
Hide file tree
Showing 10 changed files with 323 additions and 197 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
set(CPACK_PACKAGE_VENDOR "[email protected]")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE} ${PACKAGE_VERSION}")
set(SOVERSION "0.1.8")
set(SOVERSION "0.1.9")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
set(VERSION "${CPACK_PACKAGE_VERSION}")

Expand Down
8 changes: 4 additions & 4 deletions FayeCpp.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Pod::Spec.new do |s|

# Common settings
s.name = "FayeCpp"
s.version = "0.1.8"
s.summary = "Faye C++ client with objective-c client wrapper."
s.version = "0.1.9"
s.summary = "Faye C++ client with Objective-C client wrapper."
s.description = <<-DESC
Faye C++ client with objective-c client wrapper.
Faye C++ client with Objective-C client wrapper.
Library created with Pure C++ (features provided by Standard C++), without heavy STL and C++11 features.
You can use Objective-C wrapper or C++ client directly.
DESC
Expand Down Expand Up @@ -45,7 +45,7 @@ You can use Objective-C wrapper or C++ client directly.
'libwebsockets/lib/alloc.c'

s.resources = 'contrib/objc/FayeCpp.bundle'
s.compiler_flags = '-DHAVE_FAYECPP_CONFIG_H=1', '-DHAVE_CONFIG_H=1', '-DCMAKE_BUILD=1'
s.compiler_flags = '-DHAVE_FAYECPP_CONFIG_H=1', '-DHAVE_CONFIG_H=1', '-DCMAKE_BUILD=1', '-DHAVE_COREFOUNDATION_FRAMEWORK=1'
s.xcconfig = { 'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/FayeCpp/contrib/objc" "${PODS_ROOT}/FayeCpp/libwebsockets/lib" "${PODS_ROOT}/FayeCpp/jansson/src"' }
s.libraries = 'z', 'stdc++'
s.framework = 'CoreFoundation'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ git submodule update --init --recursive
### Installation with CocoaPods
#### Podfile
```ruby
pod 'FayeCpp', '~> 0.1.8'
pod 'FayeCpp', '~> 0.1.9'
```


Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.1.8.{build}
version: 0.1.9.{build}

# branches to build
branches:
Expand Down
4 changes: 2 additions & 2 deletions builds/ios/fayecpp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_ARC = NO;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
Expand Down Expand Up @@ -424,7 +424,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_ARC = NO;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
Expand Down
33 changes: 31 additions & 2 deletions builds/ios/test_faye_static/test_faye_static/ViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,14 @@ - (IBAction) onSendText:(id)sender
#if defined(OBJC_CLIENT)
if (_client)
{
[_client sendMessage:@{@"text" : [_textField text]}
toChannel:@"/seminars/5322e93d8ee60a422400008f"];
NSMutableDictionary * dict = [NSMutableDictionary dictionary];
dict[@"text"] = [_textField text];
dict[@"YES"] = @YES;
dict[@"NO"] = @NO;
dict[@"int1"] = @123;
dict[@"float1"] = @3.14;

[_client sendMessage:dict toChannel:@"/seminars/5322e93d8ee60a422400008f"];
}
#else
if (_client)
Expand Down Expand Up @@ -170,6 +176,29 @@ - (IBAction) onCreate:(id)sender
[client setSSLDataSource:self];
[client setUrlString:@"http://messages.presentain.com:80/faye"];
self.client = client;

NSMutableDictionary * ext = [NSMutableDictionary dictionary];
NSMutableArray * arr = [NSMutableArray array];
[arr addObject:@"Hello"];
[arr addObject:@"World"];
[arr addObject:[NSNull null]];
[arr addObject:@231231233234324];
[arr addObject:@3.142352532111];
[arr addObject:@YES];
[arr addObject:@NO];
ext[@"arr"] = arr;
ext[@"asd"] = @"asd";
ext[@"YES"] = @YES;
ext[@"NULL"] = [NSNull null];
ext[@"int"] = @-324432603623523111;

[_client setExtValue:ext];

NSDictionary * ext1 = [_client extValue];
if (![ext isEqualToDictionary:ext1])
{
assert(0);
}
#else
if (_client)
{
Expand Down
Loading

0 comments on commit 04fe206

Please sign in to comment.