Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: dexterov on May 16, 2019, 11:09:48 AM



Title: Using functions from api.c in cgminer
Post by: dexterov on May 16, 2019, 11:09:48 AM
Hello!

I am creating my own application for manage of Antminer S9.
I found source with API here: https://github.com/ckolivas/cgminer
And there is file api.c with functions i need and example in api-example.c
But how i can use API from api.c and create my own application for send command?

Is it possible to create library from cgminer for using functions in my C++ project? How is possible to use functions from this project?


Title: Re: Using functions from api.c in cgminer
Post by: kano on May 17, 2019, 11:16:56 PM
Hello!

I am creating my own application for manage of Antminer S9.
I found source with API here: https://github.com/ckolivas/cgminer
And there is file api.c with functions i need and example in api-example.c
But how i can use API from api.c and create my own application for send command?

Is it possible to create library from cgminer for using functions in my C++ project? How is possible to use functions from this project?
I put an example in C, Java, PHP and there's also an example in Python and Ruby.
Look for the word api in the filenames.
If that doesn't help, you'll not be able to write anything anyway.
It's a simple socket, you just send a command and get a reply then close the socket.
The "library" is called socket programming.