Git Product home page Git Product logo

dart-sync-socket's Introduction

Dart Sync Socket

Build Status pub package

A Dart VM Native Extension and supporting Dart libraries that provide synchronous socket and HTTP client support.

Installing

Add the following to your pubspec.yaml:

  sync_socket: '^1.0.1'

Then run 'pub get'.

After getting the package with pub, you will need to build the native extension itself.

To build the shared library on Mac OSX or Linux, run the 'tool/build.sh' script.

To build the DLL on Windows (32 bits):

  • Create a new project of type Win32/Win32 project in Visual Studio 2010 Express.
  • Give the project the name sync_socket.
  • On the next screen of the wizard, change the application type to DLL and select “Empty project”, then choose Finish.
  • Add the "sync_socket_extension.cc" file to the source files folder in the project.
  • Change the following settings in the project’s properties:
    • Configuration properties / Linker / Enable Incremental Linking: Set to NO.
    • Configuration properties / Linker / Input / Additional dependencies: Add dart-sdk\bin\dart.lib, from the downloaded Dart SDK.
    • Configuration properties / Linker / Input / Additional dependencies: Add Ws2_32.lib.lib. This is the Winsock library.
    • Configuration properties / C/C++ / General / Additional Include Directories: Add the path to the directory containing dart_api.h, which is dart-sdk/include in the downloaded Dart SDK.
    • Configuration properties / C/C++ / Preprocessor / Preprocessor Definitions: Add DART_SHARED_LIB. This is just to export the _init function from the DLL, since it has been declared as DART_EXPORT.
  • Build the project with "Release" target, and copy the DLL to the directory "lib".

Testing

Follow the instructions above for building the shared library then run tests as normal.

dart-sync-socket's People

Contributors

cbracken avatar dramos07 avatar drmarcii avatar goderbauer avatar raphaeladam-wf avatar sestegra avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.