sync_socket 1.0.2+1 copy "sync_socket: ^1.0.2+1" to clipboard
sync_socket: ^1.0.2+1 copied to clipboard

Dart 1 only

Synchronous Socket and HTTP Client.

Dart Sync Socket #

Build Status

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.

0
likes
15
pub points
0%
popularity

Publisher

unverified uploader

Synchronous Socket and HTTP Client.

Repository (GitHub)
View/report issues
Contributing

License

Apache-2.0 (LICENSE)

More

Packages that depend on sync_socket