Bitcoin Forum
May 08, 2024, 12:36:24 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Using functions from api.c in cgminer  (Read 253 times)
dexterov (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 16, 2019, 11:09:48 AM
 #1

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?
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
kano
Legendary
*
Offline Offline

Activity: 4494
Merit: 1808


Linux since 1997 RedHat 4


View Profile
May 17, 2019, 11:16:56 PM
 #2

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.

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!