Latest 0.2.0
Homepage https://github.com/kansaraprateek/PKSwiftSocket
License MIT
Platforms ios 8.0
Authors

[![CI Status](http://img.shields.io/travis/Prateek Kansara/PKSwiftSocket.svg?style=flat)](https://travis-ci.org/Prateek Kansara/PKSwiftSocket)
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 8.0+
  • Xcode 7.3.1+

Installation

PKSwiftSocket is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "PKSwiftSocket"

Usage


    // Initialize Socket object
    let pksocketobj : PKSocket = PKSocket(lAddress : address, lPort : port)

    // Handle connection with blocks
    pksocketobj.handleConnection({

        (Data : String?) in
        // Handle response data
            print("Response data : (Data)")
        }, Error: {
            (errorString : String) in
            // Error when connection to address
            print("Error : (errorString)")
    })

    /**
    Send data to address
    */
    pksocketobj.sendDataToStream("")

Author

Prateek Kansara, [email protected]

License

PKSwiftSocket is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "PKSwiftSocket",
    "version": "0.2.0",
    "summary": "Socket connection with block methods as well as delegate option in Swift",
    "description": "Socket connection with block methods as well as delegate option in Swift 3.0.",
    "homepage": "https://github.com/kansaraprateek/PKSwiftSocket",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Prateek Kansara": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kansaraprateek/PKSwiftSocket.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "PKSwiftSocket/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This