Giter Club home page Giter Club logo

go-tox's Introduction

gotox

GoDoc

gotox is a Go wrapper for the c-toxcore library.

Pull requests, bug reportings and feature requests (via github issues) are always welcome. :)

For a list of supported toxcore features see PROGRESS.md.

Installation

First, install the c-toxcore library.

Next, download go-tox using go:

go get github.com/codedust/go-tox

License

gotox is licensed under the GPLv3.

How to use

See bindings.go for details about supported API functions and callbacks.go for the supported callbacks.

The best place to get started are the examples in examples/.

go run examples/example.go

Feel free to ask for help in the issue tracker. ;)

go-tox's People

Contributors

codedust avatar organ avatar skuzzymiglet avatar tamak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

go-tox's Issues

Example.go doesn't seem to connect

Hi, me again.

The current version of the go-tox wrapper doesn't seem to ever connect to the Tox network as it will never receive any friend requests since about early last week. My Tox version is current at this time. I tried replacing the bootstrap node but that doesn't seem to make a difference. Neither the examples nor my own code seems to connect successfully although no errors ever happen.

Tox has been updated on my system since the last update of go-tox. I tried to get the older package version again to check if the fault is in Tox but failed to do so (I'll never remove old package tars ever again ๐Ÿ˜ž ).

If you could either confirm the problem or otherwise point me in the right direction I'd be very thankful.

Greetings!

Fatal error: tox/tox.h

Hi @codedust ,
I have problems compiling the library. It's a commented-out line. Why Go trying to implement it? Perhaps I what the not understand, but tell me that me to do in this case. Thanks

Erorr Log:

# github.com/codedust/go-tox
../../../GOPATH/src/github.com/codedust/go-tox/bindings.go:3:10: fatal error: tox/tox.h: No such file or directory
 //#include <tox/tox.h>
          ^~~~~~~~~~~
compilation terminated.

Detection of when a file has been completely sent doesn't work for small files

Hello!

I have run into the problem that when sending small files (more specifically I believe files that fit within a single chunk) the detection of when a file has been completely sent as implemented here https://github.com/codedust/go-tox/blob/master/examples/example.go#L202 doesn't trigger. In my case this results in a number of transfers remaining open as they are never closed (and a bunch of clean up work going undone ๐Ÿ˜› ).

So my question is how I can detect the successful sending of any sized file? I could check the file length against a chunk size limit to see if I'll only be sending the one chunk, but this limit is not exposed by gotox that I can see. Alternatively am I supposed to send a FileControl CANCEL on completing a transfer? That would mean cancel isn't named quite correctly (which would be a problem with ToxCore itself I think since they named it thus).

I'd appreciate a pointer towards a "reliable" solution. Thanks!

could not determine kind of name for C.TOX_SAVEDATA_*

Hi!

I tried to build the wrapper for my own tests and ran into the following error with the current version:

> go install github.com/codedust/go-tox/examples
# github.com/codedust/go-tox
could not determine kind of name for C.TOX_SAVEDATA_TYPE
could not determine kind of name for C.TOX_SAVEDATA_TYPE_NONE
could not determine kind of name for C.TOX_SAVEDATA_TYPE_SECRET_KEY
could not determine kind of name for C.TOX_SAVEDATA_TYPE_TOX_SAVE

It also happens for my own code, not only for the provided examples. By checking out the recent version 7b51493 it works again. If you need any further info just ask, happy to help. Thanks for your work!

Problem in CREATE_HOOK function

hi...
when I try to run examples in ubuntu, these errors occur repeatedly for each rows of hook.c (rows 27-41):

github.com/codedust/go-tox
In file included from /usr/lib/go-1.8/src/github.com/codedust/go-tox/callbacks.go:5:0:
./hooks.c: In function 'set_callback_self_connection_status':
./hooks.c:7:3: error: too few arguments to function 'tox_callback_self_connection_status'
tox_##x(tox, hook_##x);
^

./hooks.c:27:1: note: in expansion of macro 'CREATE_HOOK'
CREATE_HOOK(callback_self_connection_status)
^
In file included from /usr/lib/go-1.8/src/github.com/codedust/go-tox/callbacks.go:4:0:
/usr/local/include/tox/tox.h:779:6: note: declared here
void tox_callback_self_connection_status(Tox *tox, tox_self_connection_status_cb *callback, void *user_data);
^
image

I think there is something wrong with this part of code(hook.c: line 5-7):

image

Can't connect through proxy (Tor)

I'm trying to use Tox client through proxy (Tor), but client can not establish a connection.
Example of options:

savedata, err := loadData(profileFileName)
if err == nil {
    options = &gotox.Options{
        IPv6Enabled:  false,
        UDPEnabled:   false,
        ProxyType:    gotox.TOX_PROXY_TYPE_SOCKS5,
        ProxyHost:    "127.0.0.1",
        ProxyPort:    9050,
        StartPort:    0,
        EndPort:      0,
        TcpPort:      0,
        SaveDataType: gotox.TOX_SAVEDATA_TYPE_TOX_SAVE,
        SaveData:     savedata}

Windows

Does it work on windows ?

Implement File Send

Hi, me again.

I've now reached the point where I've implemented file receiving but now require the capability of file sending too. Based on PROGRESS.md and the available code this is not yet implemented.

You've stated that you were open for feature requests via issues, so here it is. I'll see if I can implement it myself if you do not have the time to yourself. However I am still new to Golang and this would be my first stint into C bindings via cgo, so if possible I'd like to avoid that. ๐Ÿ˜…

Thanks either way!

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.